i
Paytm
Filter interviews by
I applied via Approached by Company and was interviewed before May 2023. There were 2 interview rounds.
1 Hour, Asked LRU Cache
I applied via LinkedIn and was interviewed before Oct 2022. There were 4 interview rounds.
2 DSA Problems from DP and Graphs on Hackerrank, 45mins.
Boundary traversal in a tree involves visiting the nodes on the boundary of the tree in a specific order.
Start by visiting the root node.
Then visit all the left boundary nodes in a top-down manner.
Next, visit all the leaf nodes from left to right.
Finally, visit all the right boundary nodes in a bottom-up manner.
Standard leetcode problems - stacks,queues etc
There two coding problem.
Paytm interview questions for designations
I applied via Campus Placement and was interviewed before Nov 2022. There were 3 interview rounds.
Get interview-ready with Top Paytm Interview Questions
I applied via Referral
Find the number of rotations in a rotated sorted array.
Use binary search to find the minimum element in the array.
The number of rotations is equal to the index of the minimum element.
If the minimum element is at index 0, then there are no rotations.
If the array is not rotated, then the number of rotations is 0.
Modify a 2x2 matrix to replace row and column with 0 if a cell contains 0.
Iterate through the matrix and find the cells with 0.
Store the row and column index of the cells with 0 in separate arrays.
Iterate through the row and column arrays and replace all elements with 0.
Return the modified matrix.
Find row with max vowels in 2x2 matrix with first element of each row containing a vowel.
Iterate through each row and count the number of vowels in it.
Keep track of the row with max number of vowels.
If first element of a row is a vowel, start counting from that element.
Example: [['a', 'b'], ['e', 'i']] should return 2nd row.
I was interviewed in Nov 2020.
Round duration - 70 minutes
Round difficulty - Medium
Given two binary trees, T and S, determine whether S is a subtree of T. The tree S should have the same structure and node values as a subtree of T.
For each node during pre-order traversal of s, use a recursive function isSame to validate if sub-tree started with this node is the same with t.
Given an integer K
, your task is to produce all binary strings of length 'K' that do not contain consecutive '1's.
The input begins with an integer ...
You can easily observe pattern. It is a Fibonacci sequence
Round duration - 60 minutes
Round difficulty - Medium
This was a data structures round.
You are provided with an unsorted array/list ARR
of N
integers. Your task is to determine the length of the longest consecutive sequence present in the array...
I thought of two points on a number line a and b and formulated a consecutive sequence [a....b], (b*(b+1))/2-(a*(a+1))/2=n. Now we have a clearly quadratic solution by brute-forcing a and b but if we simplify it further we have (b-a+1)*(b+a) = 2*n. So now we can easily find all divisors of 2*n and satisfy the equation for which we get a>=0 and b>=0 and thus we get the answer.
Given an array of distinct integers, find all possible permutations of the array.
A permutation is a mathematical way of determining the number of possible ar...
I knew the recursive solution as it is a very popular interview problem.The idea is much like the insertion sort. We start with only the first number, and pick next number from the rest of array, insert it to the front or back position of the first number, and pick the third number, insert it to front or mid or back position of the [first, second] array, and so on, until no element left.
Round duration - 60 minutes
Round difficulty - Easy
This was a data structures round.
Your task is to verify if the given string STR1
is a subsequence of the string STR2
. A subsequence means characters from STR2
are retained in their original order but som...
Easy problem iterate over the longer string and keep a counter for matching it with shorter string if a match occurs while iterating longer string increment the counter and if we have done iterating on the longer string if the counter value is equal to shorter string length then return true else return false.
Given a square array VEC
of integers with N
rows and N
columns, you need to determine the minimum sum of a falling path through this square array. The array has ...
It was also an easy problem as I had done it before.The minimum path to get to element A[i][j] is the minimum of A[i - 1][j - 1], A[i - 1][j] and A[i - 1][j + 1]. Starting from row 1, we add the minimum path to each element. The smallest number in the last row is the minimum path sum.
Round duration - 25 minutes
Round difficulty - Easy
This round was all about OS/DBMS questions.
Tip 1 : Practice atleast 100-150 Medium problems and 20-30 hard problems from leetcode
Tip 2 : Try to give a short contest maybe on leetcode, codeforces or codechef as it is beneficial to crack in Online Test.
Tip 3 : Do atleast 2 projects and ask find answers like why are you choosing this tech stack? why did not you choose its alternatives Know your project in and out because they might ask you an modification in your project.
Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume.
Tip 3 : Try to keep a single page resume.
Tip 4 : If your CGPA is quite low do not mention it on the resume.
Tip 5 : In achievements sections only add relevant achievements. Putting achievements like "won painting competition" or "won dancing competition" wont help.
I was interviewed before Sep 2020.
Round duration - 90 Minutes
Round difficulty - Medium
The test was organized online on Amcat and there were 3 coding problems. There were no MCQs in this round.
Implement a function that determines whether a given numeric string contains any substring whose integer value equals the product of two consecutive integers. The functio...
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 t...
Suppose from the current node, if the target node is at depth ‘X’ in the left subtree. So that nodes at distance ‘K-X’ in the right subtree should be part of the answer array and it is ‘K’ distance from the given target node. Go to ROOT→LEFT, now target node is at depth ‘X-1’ from the CURRENTNODE(ROOT->LEFT), then find all the nodes that are ‘K - X + 1’ depth and all should be added to the answer.
Round duration - 50 Minutes
Round difficulty - Medium
This round was scheduled by the college Training and Placement team virtually. The interviewer asked me questions pertaining mainly to DSA and we discussed my projects.
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-v...
The basic idea is to divide the linked list into two parts - odd and even. The even linked list will contain only nodes whose value is even and vice - versa for the odd linked list. Finally, we will attach the odd linked list after the even linked list.
Algorithm
Round duration - 60 Minutes
Round difficulty - Easy
Again, the round was virtual. This was a Tech + Managerial round organized by the college T & P cell. The interviewer asked questions related to fundamental subjects such as Operating Systems, Object-oriented programming, and DBMS. There was one coding round at the end.
Given a binary tree of integers, find its diagonal traversal. Refer to the example for clarification on diagonal traversal.
Consider lines at a...
The idea is to use the Map to store all the nodes of a particular diagonal number. We will use preorder traversal to update the Map. The key of the Map will be the diagonal number and the value of the Map will be an array/list that will store all nodes belonging to that diagonal.
The steps are as follows:
Round duration - 40 Minutes
Round difficulty - Easy
The round was virtual and was organized by the T & P cell of the college. The interviewer asked some behavioural and situation-based questions. There was one puzzle at the end.
Tip 1 : For a product-based company, the first important thing is to solve as many DSA problems as possible. I solved problems mainly on GeeksforGeeks, LeetCode, and Coding Ninjas.
Tip 2 : Prepare 2-3 good projects based on your technical skillset. Prepare it very well as there is a high chance that projects would be discussed in the interview.
Tip 3 : Prepare fundamental college subjects like Operating systems, Object-oriented Programming, Database Management.
Tip 1 : Keep it short and concise
Tip 2 : Describe your projects very specifically
I was interviewed before Sep 2020.
Round duration - 60 minutes
Round difficulty - Medium
It was held in the evening around 4 pm. The camera was on during the test to invigilate the activity of students. On any doubtful action, warning was given. Platform was easy to code in.
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...
I made some syntax errors in this one. Be careful.
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...
This was a greedy problem.
1. Sort the array of coins in decreasing order. Initialize result as empty.
2. Find the largest denomination that is smaller than current amount.
3. Add found denomination to result.
4. Subtract value of found denomination from amount.
5. If amount becomes 0, then print result.
6. Else repeat steps 3 and 4 for new value of V.
Given an array of non-negative integers, your task is to partition this array into two subsets such that the absolute difference between the sums of the subsets is mi...
The recursive approach is to generate all possible sums from all the values of the array and to check which solution is the most optimal one.
To generate sums we either include the i’th item in set 1 or don’t include, i.e., include in set 2.
More optimized solution is Dynamic Programming.
Round duration - 60 minutes
Round difficulty - Medium
It was held in the morning around 11:30 am. The interview was scheduled on google meet. The interviewer was quite friendly. He started by a brief introduction. This round was mostly based on Data structures and algorithms. At the end he asked some concepts of OOPs and Operating System.
Given a string (STR
) of length N
, you are tasked to create a new string through the following method:
Select the smallest character from the first K
characters of STR
, remov...
O(1)
Since we ar...
Design a stack that efficiently supports the getMin() operation in O(1) time with O(1) extra space. This stack should include the following operations: push(), pop(), top(), is...
1. Start from brute force approach by using another stack.
2. Optimise it with reducing push and pop operations.
3. Optimise it to O(1) space complexity.
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’.
1. I started with brute force approach using three loops.
2. I optimized it to two loops by using sorting and two pointer technique.
Tip 1 : Explain what deadlock is briefly.
Tip 2 : Be confident while answering.
Tip 3 : Explain its conditions in detail. Refer to youtube channel gate smashers for clarity of topic.
Round duration - 45 minutes
Round difficulty - Medium
It was held in the afternoon around 3pm. The interviewer was quite friendly. She started with my introduction. She asked 2-3 problems related to data structures and then asked about python libraries which I used in my projects.
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 anoth...
I used hash maps to solve the problems.
You are provided with an array of integers ARR
of size N
and an integer K
. Your task is to find and return the K
-th smallest value present in the array. All elements...
1. I started with brute force approach of sorting the array and then finding the kth smallest element. This was O(nlogn) approach.
2. Then I solved using heaps with an O(n) approach.
Round duration - 45 minutes
Round difficulty - Medium
It was held in the evening around 6 pm. The interviewer started with a brief introduction of me. He asked about my projects and then asked some concepts of Operating System and problems related to data structures. I had projects of Machine Learning and Deep learning. Discussion about projects continued for about 25 minutes.
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 ...
Used hare and tortoise method to solve this problem.
Tip 1 : Practice problems related to data structures and algorithms
Tip 2 : Brush up fundamental concepts deeply
Tip 3 : You should have a deep knowledge of your projects and related technology.
Tip 1 : It should not be more than a page.
Tip 2 : It should be precise and university projects or prior experience like industrial training or internship should be mentioned.
Top trending discussions
4 Interview rounds
based on 178 reviews
Rating in categories
Team Lead
2k
salaries
| ₹2 L/yr - ₹11.4 L/yr |
Software Engineer
1.4k
salaries
| ₹6 L/yr - ₹23 L/yr |
Senior Software Engineer
1.4k
salaries
| ₹10 L/yr - ₹40 L/yr |
Sales Executive
958
salaries
| ₹1 L/yr - ₹6.4 L/yr |
Senior Associate
914
salaries
| ₹2.1 L/yr - ₹8.4 L/yr |
BharatPe
Zerodha
Razorpay
Mobikwik