i
Paytm
Filter interviews by
A binary tree is a BST if for every node, left children are smaller and right children are larger than the node.
A BST must satisfy the property: left < node < right for all nodes.
Use a recursive function to check each node against min and max values.
Example: For the tree with root 5, left child 3, right child 7, it is a BST.
Example: For the tree with root 5, left child 7, right child 3, it is NOT a BST.
Merge sort using linked list is a sorting algorithm that divides the list into smaller sublists, sorts them, and then merges them back together.
Create a function to merge two sorted linked lists
Divide the linked list into two halves using slow and fast pointers
Recursively sort the two halves
Merge the sorted halves back together
Company growth is for expanding market share, increasing revenue, attracting top talent, and staying competitive.
Expanding market share by reaching new customers and increasing sales
Increasing revenue through higher sales volume and new product offerings
Attracting top talent by showcasing a successful and growing company
Staying competitive in the market by adapting to changes and innovating
Improving brand reputati...
Sales is the process of selling goods or services in exchange for money or other forms of compensation.
Sales involves identifying potential customers, presenting products or services to them, and closing deals.
It also includes building relationships with customers to encourage repeat business.
Sales can be done through various channels such as face-to-face interactions, phone calls, emails, and online platforms.
Exa...
Tcpdump is a command-line packet analyzer used to capture and analyze network traffic.
Tcpdump captures packets on a network interface, allowing for real-time analysis.
Basic command: 'tcpdump -i eth0' captures packets on the eth0 interface.
Use filters to capture specific traffic, e.g., 'tcpdump -i eth0 port 80' for HTTP traffic.
Output can be saved to a file with '-w', e.g., 'tcpdump -i eth0 -w capture.pcap'.
Analyze...
The Lowest Common Ancestor (LCA) of a Binary Search Tree is the node that is the common ancestor of two given nodes.
The LCA of a Binary Search Tree can be found by comparing the values of the two nodes with the current node's value and traversing left or right accordingly.
If one node's value is less than the current node's value and the other node's value is greater, then the current node is the LCA.
If both nodes ...
Sales in market field refer to the process of selling goods or services to customers in exchange for money.
Sales involve identifying potential customers, presenting products or services, and closing deals
Sales can be conducted through various channels such as online, in-person, or over the phone
Effective sales strategies often involve building relationships with customers and understanding their needs
Sales perform...
I led the development of innovative products at my previous company, driving revenue growth and market expansion.
Introduced new product lines to target emerging markets
Implemented customer feedback to improve existing products
Collaborated with cross-functional teams to launch successful products
Design a notification service for sending real-time alerts to users.
Use a scalable messaging system like Kafka or RabbitMQ to handle high volume of notifications.
Implement a user preference system to allow users to choose their preferred notification channels (email, SMS, push notifications, etc).
Include a scheduling feature to send notifications at specific times or intervals.
Ensure notifications are personalized...
I can be helpful to the organization by analyzing data, identifying trends, and providing insights to support decision-making.
Conduct thorough data analysis to identify patterns and trends
Generate reports and presentations to communicate findings to stakeholders
Collaborate with cross-functional teams to provide insights and recommendations
Utilize tools such as Excel, SQL, and Tableau to analyze and visualize data
I applied via Newspaper Ad and was interviewed in Nov 2024. There were 2 interview rounds.
Asked 2 questions-
first zigzag traversal of binary tree
second remove node from back of linked list
I applied via Company Website and was interviewed in Jan 2024. There were 2 interview rounds.
Gave a case study, I needed to read through it and answer few questions
I am a motivated and detail-oriented business student with strong analytical skills and a passion for problem-solving.
Currently pursuing a degree in Business Administration
Completed coursework in data analysis and statistics
Previous internship experience at a marketing firm
Proficient in Excel, SQL, and data visualization tools
I applied via LinkedIn and was interviewed before Nov 2023. There was 1 interview round.
Business Analyst focuses on business processes and requirements, while Data Analyst focuses on analyzing data to provide insights.
Business Analyst focuses on understanding business processes, identifying needs, and recommending solutions.
Data Analyst focuses on collecting, analyzing, and interpreting data to provide insights and support decision-making.
Business Analyst works closely with stakeholders to gather requirem...
I applied via LinkedIn and was interviewed before Nov 2023. There was 1 interview round.
I appeared for an interview in Aug 2021.
Round duration - 70 Minutes
Round difficulty - Medium
Their were 3 DSA coding questions of medium and hard level. I need to solve them in 70 minutes. Coding questions were of Arrays, Linked list and Binary search trees
Given a singly linked list of integers, return the head of the reversed linked list.
Initial linked list: 1 -> 2 -> 3 -> 4 -> NULL
Reversed link...
Reverse a singly linked list of integers and return the head of the reversed linked list.
Iterate through the linked list and reverse the pointers to point to the previous node instead of the next node.
Use three pointers to keep track of the current, previous, and next nodes while reversing the linked list.
Update the head of the reversed linked list as the last node encountered during the reversal process.
Given an array/list ARR
consisting of integers where each element is either 0, 1, or 2, your task is to sort this array in increasing order.
The input sta...
Sort an array of 0s, 1s, and 2s in increasing order.
Use a three-pointer approach to sort the array in a single pass.
Initialize low, mid, and high pointers at the start, iterate through the array, and swap elements accordingly.
Example: If the current element is 0, swap it with the element at the low pointer and increment both low and mid pointers.
Round duration - 60 Minutes
Round difficulty - Medium
This round was majorly focused on problem solving skills and DSA. Interviewer asked me three DSA questions of medium and hard level. He started with the hard question, he asked me zig-zag binary tree traversal. we discussed the approach than I coded it and explained its Time and space complexity. Than he asked me max sum subarray modified question, I solved it using Kadane algorithm. Than he discussed one of my online assesments question and asked me to further optimize that approach that I used in the online test. Than I optimized that approach and coded that. Than he asked me for any questions and we dropped the call.
Given a binary tree with 'N' nodes, your task is to print the nodes in spiral order traversal.
The binary tree is represented i...
Print nodes of a binary tree in spiral order traversal.
Use a queue to perform level order traversal.
Alternate between printing nodes from left to right and right to left at each level.
Handle null nodes appropriately.
Example: For input '1 2 3 -1 -1 4 5 -1 -1 -1 -1', the output should be '1 3 2 4 5'.
Given an array of integers, determine the maximum possible sum of any contiguous subarray within the array.
array = [34, -50, 42, 14, -5, 86]
Find the maximum sum of any contiguous subarray within an array of integers.
Iterate through the array and keep track of the maximum sum of subarrays encountered so far.
At each index, decide whether to include the current element in the subarray or start a new subarray.
The maximum subarray sum can be calculated using Kadane's algorithm.
Example: For array [34, -50, 42, 14, -5, 86], the maximum sum is 137.
Example: For arr...
Round duration - 40 Minutes
Round difficulty - Medium
This round was mainly focused on operating systems, DBMS and past projects. we started with the introduction. Interviewer asked me explain a functionality of one of my projects that I wrote in my resume, I done that than he started asking OS and DBMS questions. After that we asked me about any bad experience in my past internship, I told that than he asked for any questions to me and we dropped the call and after 2 days I got HR mail that I'm selected.
Tip 1 : prepare DSA well
Tip 2 : prepare core subjects well.
Tip 1 : Write internships and projects in detail
Tip 2 : Avoid grammar errors
I appeared for an interview 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 appeared for an interview 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.
I appeared for an interview 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.
Top trending discussions
The duration of Paytm interview process can vary, but typically it takes about less than 2 weeks to complete.
based on 6 interview experiences
Difficulty level
Duration
based on 8.1k reviews
Rating in categories
Team Lead
2k
salaries
| ₹2 L/yr - ₹9.5 L/yr |
Senior Software Engineer
1.5k
salaries
| ₹11 L/yr - ₹38 L/yr |
Software Engineer
1.4k
salaries
| ₹6 L/yr - ₹21 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