i
Paytm
Filter interviews by
Clear (1)
I was interviewed in Feb 2021.
Round duration - 60 minutes
Round difficulty - Medium
The nature of the interviewer was very kind. The test was proctored, our webcam and mic were on, and shared my screen.
Given a binary tree, determine the length of its diameter. The diameter is defined as the longest path between any two end nodes in the tree. The path's length is re...
The diameter of a binary tree is the longest path between any two end nodes in the tree.
Traverse the tree to find the longest path between two leaf nodes.
Use depth-first search (DFS) to calculate the height of each subtree.
The diameter is the sum of the heights of the left and right subtrees + 1.
Given an array of integers ARR
of length N
and an integer Target
, your task is to return all pairs of elements such that they add up to the Target
.
The first line ...
Given an array of integers and a target, find all pairs of elements that add up to the target.
Iterate through the array and for each element, check if the target minus the element exists in a hash set.
If it does, add the pair to the result. If not, add the element to the hash set.
Handle cases where the same element is used twice in a pair.
Return (-1, -1) if no pair is found.
Round duration - 35 minutes
Round difficulty - Medium
The nature of the interviewer was very kind, helped me when I stuck. The round was proctored, our webcam and mic were on, and shared my screen.
Tip 1 : Do at least 1 projects at any technology
Tip 2 : Learn DSA at least these topics Array, LL, Tree, DP
Tip 1 : At least mention the projects or internships on your resume.
Tip 2 : Avoid unnecessary details like Hobbies, declaration, date.
I was interviewed in Dec 2020.
Round duration - 70 minutes
Round difficulty - Easy
Parth, a budding programmer, has received an array 'ARR' of 'N' positive integers. His OCD is triggered whenever an odd number appears at an even index or an even number at an odd in...
Reorder array to avoid odd numbers at even indices and even numbers at odd indices.
Swap odd numbers at even indices with the nearest odd number at an odd index.
Swap even numbers at odd indices with the nearest even number at an even index.
Maintain counts of odd and even numbers to ensure equal distribution.
You are provided with a matrix of characters, CHARACTER_MATRIX
of size M x N
, and a string WORD
. Your goal is to locate and display all occurrences of the string within the ...
Find all occurrences of a given string in a matrix in all eight possible directions.
Iterate through each cell in the matrix and check for the starting character of the word.
For each starting character found, check in all eight directions for the complete word.
Keep track of the coordinates of each character in the word for each occurrence.
Print the coordinates of each character for all occurrences found.
If no occurrence
Given an arbitrary binary tree, a node of the tree, and an integer 'K', find all nodes that are at a distance K from the specified node, and return a list of th...
Given a binary tree, a target node, and an integer K, find all nodes at distance K from the target node.
Traverse the binary tree to find the target node.
From the target node, perform a depth-first search to find nodes at distance K.
Use a recursive function to keep track of the distance from the target node.
Return the values of nodes found at distance K in any order.
Round duration - 50 minutes
Round difficulty - Easy
The nature of the interviewer was very kind. The test was proctored, our webcam and mic were on, and shared my screen.
Given a binary tree of integers, find its diagonal traversal. Refer to the example for clarification on diagonal traversal.
Consider lines at a...
Find the diagonal traversal of a binary tree of integers.
Traverse the binary tree diagonally using a queue and a map to store nodes at each diagonal level.
Use a depth-first search approach to traverse the tree and populate the map with nodes at each diagonal level.
Iterate through the map to get the diagonal traversal of the binary tree.
Given a binary tree, determine the length of its diameter. The diameter is defined as the longest path between any two end nodes in the tree. The path's length is re...
The diameter of a binary tree is the longest path between any two end nodes in the tree.
Traverse the tree to find the longest path between two leaf nodes.
Use depth-first search (DFS) to calculate the height of each subtree.
The diameter is the sum of the heights of the left and right subtrees + 1.
Round duration - 50 minutes
Round difficulty - Medium
The nature of the interviewer was very kind, helped me when I stuck. The test was proctored, our webcam and mic were on, and shared my screen.
Given a list of integers of size N
, your task is to determine the Next Greater Element (NGE) for every element. The Next Greater Element for an element X
is the firs...
Find the Next Greater Element for each element in a list of integers.
Iterate through the list of integers from right to left.
Use a stack to keep track of elements whose NGE is yet to be found.
Pop elements from the stack until a greater element is found or the stack is empty.
Assign the NGE as the top element of the stack or -1 if the stack is empty.
Repeat the process for all elements in the list to find their NGEs.
Given an array/list of positive integers and an integer K, determine if there exists a subset whose sum equals K.
Provide true
if such a subset exists, otherwise r...
Given an array of positive integers and an integer K, determine if there exists a subset whose sum equals K.
Use dynamic programming to solve this problem efficiently
Create a 2D array to store if a subset sum is possible for each element and sum
Iterate through the array and update the 2D array accordingly
Check if the subset sum for K is possible using the 2D array
Round duration - 50 minutes
Round difficulty - Easy
The nature of the interviewer was very kind, helped me when I stuck. The test was proctored, our webcam and mic were on, and shared my screen.
Imagine you are Harshad Mehta's friend, and you have been given the stock prices of a particular company for the next 'N' days. You can perform up to two buy-and-sell ...
Given stock prices for 'N' days, find maximum profit with up to two buy-and-sell transactions.
Iterate through the array of stock prices to find the maximum profit with two transactions
Keep track of the maximum profit by considering all possible buy and sell combinations
Ensure to sell the stock before buying again to maximize profit
Tip 1 : Do at least 1 projects at any technology
Tip 2 : Learn DSA at least these topics Array, LL, Tree, DP
Tip 1 : At least mention the projects or internships on your resume.
Tip 2 : Avoid unnecessary details like Hobbies, declaration, date.
I was interviewed in Dec 2020.
Round duration - 45 minutes
Round difficulty - Medium
The nature of the interviewer was very kind. The test was proctored, our webcam and mic were on, and shared my screen.
Given a binary tree of integers, find its diagonal traversal. Refer to the example for clarification on diagonal traversal.
Consider lines at a...
Diagonal traversal of a binary tree involves printing nodes at the same diagonal in a specific order.
Traverse the tree in a diagonal manner, starting from the root node and moving towards the right child and then the left child.
Use a queue to keep track of nodes at each level of the tree.
Print the nodes in each diagonal level in the order they are encountered.
Example: For the given binary tree, the diagonal traversal w
You are given a Binary Tree, and you need to determine the length of the diameter of the tree.
The diameter of a binary tree is the length of the longest path betwe...
The task is to find the diameter of a binary tree, which is the longest path between any two nodes in the tree.
Traverse the tree to find the longest path between any two nodes.
Keep track of the maximum diameter found during traversal.
The diameter may not necessarily pass through the root node.
Consider both left and right subtrees while calculating the diameter.
Example: For input '1 2 3 4 -1 5 6 -1 7 -1 -1 -1 -1 -1 -1',
Round duration - 45 Minutes
Round difficulty - Medium
The nature of the interviewer was very kind, helped me when I stuck. The test was proctored, our webcam and mic were on, and shared my screen.
Given a list of integers of size N
, your task is to determine the Next Greater Element (NGE) for every element. The Next Greater Element for an element X
is the firs...
Find the Next Greater Element for each element in a list of integers.
Iterate through the list of integers from right to left.
Use a stack to keep track of elements for which the Next Greater Element is not yet found.
Pop elements from the stack until a greater element is found or the stack is empty.
Assign the Next Greater Element as the top element of the stack or -1 if the stack is empty.
Given an array/list of positive integers and an integer K, determine if there exists a subset whose sum equals K.
Provide true
if such a subset exists, otherwise r...
Given an array of positive integers and an integer K, determine if there exists a subset whose sum equals K.
Use dynamic programming to solve this problem efficiently.
Create a 2D array to store if a subset sum is possible for each element and target sum.
Iterate through the array and update the 2D array based on the current element and target sum.
Check if the 2D array contains true for the target sum at the end.
Round duration - 45 Minutes
Round difficulty - Medium
The nature of the interviewer was very kind, helped me when I stuck. The test was proctored, our webcam and mic were on, and shared my screen.
Imagine you are Harshad Mehta's friend, and you have been given the stock prices of a particular company for the next 'N' days. You can perform up to two buy-and-sell ...
The task is to determine the maximum profit that can be achieved by performing up to two buy-and-sell transactions on a given set of stock prices.
Iterate through the array of stock prices and keep track of the maximum profit that can be achieved with two transactions.
Maintain variables to store the maximum profit after the first buy-sell, the maximum profit after the second buy-sell, and the minimum price encountered s...
Tip 1 : Do at least 1 projects at any technology
Tip 2 : Learn DSA at least these topics Array, LL, Tree, DP
Tip 1 : At least mention the projects or internships on your resume.
Tip 2 : Avoid unnecessary details like Hobbies, declaration, date.
What people are saying about Paytm
I was interviewed in Dec 2020.
Round duration - 60 minutes
Round difficulty - Easy
Coding round with 3 coding questions.
Given an arbitrary binary tree, a node of the tree, and an integer 'K', find all nodes that are at a distance K from the specified node, and return a list of th...
Given a binary tree, a target node, and an integer K, find all nodes at distance K from the target node.
Traverse the tree to find the target node.
From the target node, perform a depth-first search to find nodes at distance K.
Use a recursive function to keep track of the distance from the target node.
Return the values of nodes found at distance K in any order.
Rahul is learning about arrays and lists. His teacher gave him a task to find the length of the smallest subarray in a given array 'ARR' of size 'N' with its sum great...
Find the length of the smallest subarray in a given array with sum greater than a given value.
Iterate through the array while keeping track of the current subarray sum.
Use two pointers technique to find the smallest subarray with sum greater than X.
Update the minimum subarray length as you iterate through the array.
Return the length of the smallest subarray found.
Example: For ARR = [1, 2, 21, 7, 6, 12] and X = 23, the
Given a numeric string STR
consisting of characters from ‘0’ to ‘9’, encrypt the string by replacing each numeric character according to the mapping:
‘0’ -> ‘9’, ‘1’...
Encrypt each digit in a numeric string by replacing it with its encrypted equivalent.
Iterate through each character in the string and replace it with its encrypted equivalent
Use a mapping to determine the encrypted equivalent of each digit
Return the encrypted string for each test case
Round duration - 50 minutes
Round difficulty - Medium
The nature of the interviewer was very kind. The test was proctored, our webcam and mic were on, and shared my screen.
Given a binary tree of integers, find its diagonal traversal. Refer to the example for clarification on diagonal traversal.
Consider lines at a...
Diagonal traversal of a binary tree is finding the nodes in the tree along the diagonals from top-left to bottom-right.
Traverse the tree in a diagonal manner, starting from the root node and moving towards the right child and then the left child.
Use a queue to keep track of nodes at each level of the tree.
Maintain a map to store nodes at each diagonal level and then print the nodes in the map in the required order.
Parth, a budding programmer, has received an array 'ARR' of 'N' positive integers. His OCD is triggered whenever an odd number appears at an even index or an even number at an odd in...
Reorder array to avoid odd numbers at even indices and even numbers at odd indices.
Swap odd numbers at even indices with the nearest odd number at an odd index, and vice versa.
Use two pointers approach to iterate through the array and swap elements accordingly.
Ensure the array has equal numbers of odd integers and odd-index positions and vice-versa.
Round duration - 50 minutes
Round difficulty - Easy
The nature of the interviewer was very kind. The test was proctored, our webcam and mic were on, and shared my screen.
Given an array/list of positive integers and an integer K, determine if there exists a subset whose sum equals K.
Provide true
if such a subset exists, otherwise r...
Given an array of positive integers and an integer K, determine if there exists a subset whose sum equals K.
Use dynamic programming to solve this problem efficiently
Create a 2D array to store if a subset sum is possible for each element and sum
Iterate through the array and update the 2D array accordingly
Check if the subset sum for K is possible at the end
Given a list of integers of size N
, your task is to determine the Next Greater Element (NGE) for every element. The Next Greater Element for an element X
is the firs...
Find the Next Greater Element for each element in a list of integers.
Iterate through the list of integers from right to left.
Use a stack to keep track of elements whose NGE is yet to be found.
Pop elements from the stack until a greater element is found or the stack is empty.
Assign the NGE as the top element of the stack or -1 if the stack is empty.
Tip 1 : Do at least 1 project in any technology
Tip 2 : Learn DSA at least these topics Array, LL, Tree, DP
Tip 1 : At least mention the projects and internships on your resume.
Tip 2 : Avoid unnecessary details like Hobbies, declaration, date.
Paytm interview questions for designations
I applied via Instahyre and was interviewed in Oct 2024. There were 3 interview rounds.
Basic Nodejs questions
1 hour test conducted by the company
Data structure and all
I applied via Campus Placement and was interviewed before Aug 2023. There were 2 interview rounds.
All about coding and solving questions
I applied via AngelList and was interviewed before Oct 2021. There were 2 interview rounds.
I was interviewed in Mar 2021.
Round duration - 90 minutes
Round difficulty - Medium
Started with projects discussion and internships and moved forward with coding problems.
It started at around 6:00 PM and lasted for 90 minutes approximately
The interviewer was very cool, he even gave me some tips on improving myself further at the end of the interview.
Given a string S
of length N
and an integer K
, find the length of the longest substring that contains at most K
distinct characters.
The first...
Find the length of the longest substring with at most K distinct characters in a given string.
Use a sliding window approach to keep track of the characters and their counts within the window.
Maintain a hashmap to store the characters and their frequencies.
Update the window size and characters count as you iterate through the string.
Return the maximum window size encountered for each test case.
Given an array of integers with numbers in random order, write a program to find and return the number which appears the most frequently in the array.
If multip...
Find the number with the maximum frequency in an array of integers.
Iterate through the array and keep track of the frequency of each number using a hashmap.
Find the number with the maximum frequency and return it.
If multiple elements have the same maximum frequency, return the one that appears first.
Ninja wants to travel from his house to his best friend's house. The locations of the houses are on a 2D coordinate plane, where Ninja's house is located at the origin (0...
Determine if Ninja can reach his friend's house with even x-coordinate without using modulus operator.
Check if the x-coordinate is even or odd by using bitwise AND operation with 1.
Return 1 if x-coordinate is even, else return 0.
Handle multiple test cases by iterating through each input.
Round duration - 60 minutes
Round difficulty - Easy
I was asked a coding question then, a system design question and some basic operating systems and oops questions
Given an array ARR
of size 'N', where each integer is in the range from 0 to N - 1, identify all elements that appear more than once.
Return the duplicate elements in any orde...
Find duplicates in an array of integers within a specified range.
Iterate through the array and keep track of the count of each element using a hashmap.
Return elements with count greater than 1 as duplicates.
Time complexity can be optimized to O(N) using a set to store seen elements.
Designing a Google Search Engine involves creating a web crawler, indexing system, and ranking algorithm.
Develop a web crawler to discover and retrieve web pages.
Implement an indexing system to store and organize the content of web pages.
Design a ranking algorithm to determine the relevance of search results.
Include features like autocomplete, spell check, and personalized search results.
Optimize for speed and scalabil...
Tip 1 : Practice data structures problems
Tip 2 : Read about System Designs
Tip 3 : Study the popular algorithms
Tip 1 : Mention your projects
Tip 2 : Mention your internships
based on 2 reviews
Rating in categories
Team Lead
2.3k
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Software Engineer
1.4k
salaries
| ₹0 L/yr - ₹0 L/yr |
Software Engineer
1.4k
salaries
| ₹0 L/yr - ₹0 L/yr |
Sales Executive
974
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Associate
915
salaries
| ₹0 L/yr - ₹0 L/yr |
BharatPe
Zerodha
Razorpay
Mobikwik