i
Paytm
Filter interviews by
Dora, on her visit to India, decides to enjoy Indian cuisine where payments are accepted only in specific denominations. Your task is to help Dora obtain the minimum number ...
Find the minimum number of coins needed to make up a given amount using specific denominations.
Iterate through the available denominations in descending order
For each denomination, calculate the maximum number of coins that can be used
Subtract the total value of coins used from the amount until amount becomes 0
You are given the head node of a singly linked list head
. Your task is to modify the linked list so that all the even-valued nodes appear before all the odd-va...
Reorder a singly linked list so that all even-valued nodes appear before odd-valued nodes while preserving the original order.
Create two separate linked lists for even and odd nodes
Traverse the original list and move nodes to respective even or odd lists
Merge the even and odd lists while maintaining the original order
Given a binary tree of integers, find its diagonal traversal. Refer to the example for clarification on diagonal traversal.
Consider lines at an...
Diagonal traversal of a binary tree involves printing nodes at 135 degree angle in between lines.
Traverse the tree in a diagonal manner, starting from the root node.
Maintain a map to store nodes at each diagonal level.
Print the nodes at each diagonal level in the order of traversal.
Implement a function that determines whether a given numeric string contains any substring whose integer value equals the product of two consecutive integers. The function...
Implement a function to determine if a numeric string contains a substring whose value equals the product of two consecutive integers.
Iterate through all substrings of the input string and check if their integer value equals the product of two consecutive integers.
Use nested loops to generate all possible substrings efficiently.
Check if the product of two consecutive integers matches the integer value of the subst...
Given a binary tree, a target node within this tree, and an integer K
, identify and return all nodes that are exactly K
edges away from the ta...
Find nodes at a specific distance from a target node in a binary tree.
Traverse the binary tree to find the target node.
Perform a depth-first search to identify nodes at distance K from the target node.
Return the values of nodes found at distance K in an array.
You are given a matrix where every element is either a 1 or a 0. The task is to replace 0 with 1 if it is surrounded by 1s. A 0 (or a set of 0s) is considered to be surrounded ...
Given a matrix of 1s and 0s, replace 0s surrounded by 1s with 1s.
Iterate through the matrix and check each 0 surrounded by 1s.
If a 0 is surrounded by 1s, replace it with 1.
Update the matrix in place without printing or returning it.
Given an infinite supply of coins of varying denominations, determine the total number of ways to make change for a specified value using these coins. If it's not possible to make ...
The task is to determine the total number of ways to make change for a specified value using given denominations.
Use dynamic programming to keep track of the number of ways to make change for each value up to the target value.
Iterate through each denomination and update the number of ways to make change for each value based on the current denomination.
Handle base cases such as making change for 0 or using only the...
Given an array of ‘N’ integers, determine the number of subsequences of length 3 that form a geometric progression with a specified common ratio ‘R’.
Count the number of subsequences of length 3 forming a geometric progression with a specified common ratio in an array of integers.
Iterate through the array and for each element, check for possible subsequences of length 3 with the given common ratio.
Use a hashmap to store the count of possible subsequences for each element as the middle element.
Return the total count of subsequences modulo 10^9 + 7.
Example: For i...
Given an array or list of strings called inputStr
, your task is to return the strings grouped as anagrams. Each group should contain strings that are anagrams of one anothe...
Group anagrams in an array of strings based on their characters.
Iterate through each string in the input array/list.
For each string, sort the characters alphabetically to create a key for grouping.
Use a hashmap to group strings with the same key.
Return the grouped anagrams as separate arrays of strings.
You are given the head node of a singly linked list. Your task is to return a pointer pointing to the middle of the linked list.
If there is an odd number of elements, return the m...
Return the middle element of a singly linked list, or the one farther from the head node if there are even elements.
Traverse the linked list with two pointers, one moving twice as fast as the other
When the fast pointer reaches the end, the slow pointer will be at the middle
Return the element pointed to by the slow pointer
1st round was online test with 3 easy-medium leetcode questions
Quick sort is an efficient sorting algorithm that uses a divide-and-conquer approach to sort elements in an array.
1. Choose a 'pivot' element from the array.
2. Partition the array into two sub-arrays: elements less than the pivot and elements greater than the pivot.
3. Recursively apply the above steps to the sub-arrays.
4. Combine the sorted sub-arrays and the pivot to get the final sorted array.
Example: For array [3, 6...
Javascript, nodejs, react qustions
I applied via Naukri.com and was interviewed in Aug 2024. There was 1 interview round.
I applied via Referral and was interviewed in Jun 2024. There were 3 interview rounds.
Got an hackerRank test link which consists HTML, CSS, JS, React and DSA question with MCQs.
Medium level one coding question
2 questions in DSA on arrays and linked list
LinkedIn List based problems involve manipulating linked lists to solve various coding challenges.
Implement common linked list operations like insertion, deletion, and traversal.
Solve problems involving reversing a linked list, detecting cycles, or finding the intersection point of two linked lists.
Use techniques like two pointers, recursion, or hash tables to optimize solutions.
Rotate a linked list by k positions
Traverse the linked list to find the length and the last node
Connect the last node to the head to make it a circular linked list
Traverse again to find the new tail node at position length - k % length
Set the new head as the next node of the new tail and update the new tail's next to null
To find the kth element in a linked list, iterate through the list and return the element at the kth position.
Iterate through the linked list while keeping track of the current position
Return the element when the current position equals k
Handle cases where k is out of bounds or the linked list is empty
Level order traversal of a binary tree with alternate order
Use a queue to perform level order traversal
Alternate the order of nodes at each level
Example: For a binary tree with nodes 1, 2, 3, 4, 5, the output could be ['1', '3 2', '4 5']
Top trending discussions
Some of the top questions asked at the Paytm Software Engineer interview -
The duration of Paytm Software Engineer interview process can vary, but typically it takes about less than 2 weeks to complete.
based on 40 interview experiences
Difficulty level
Duration
based on 191 reviews
Rating in categories
Team Lead
2k
salaries
| ₹4.2 L/yr - ₹9.7 L/yr |
Senior Software Engineer
1.5k
salaries
| ₹11 L/yr - ₹38 L/yr |
Software Engineer
1.4k
salaries
| ₹10 L/yr - ₹17.5 L/yr |
Sales Executive
985
salaries
| ₹0.9 L/yr - ₹5.3 L/yr |
Senior Associate
958
salaries
| ₹2.2 L/yr - ₹9.1 L/yr |
BharatPe
Zerodha
Razorpay
Mobikwik