i
Paytm
Filter interviews by
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 - 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 appeared for an interview 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.
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.
Paytm interview questions for designations
Top trending discussions
Race condition is a situation where multiple threads/processes access and manipulate shared data simultaneously.
It can be eliminated by using synchronization techniques like locks, semaphores, and mutexes.
Another way is to use atomic operations that ensure the data is accessed and modified atomically.
Using thread-safe data structures can also prevent race conditions.
Example: Two threads trying to increment a shared var...
JCube is a Java library for creating and manipulating Rubik's Cube puzzles.
JCube provides classes for representing Rubik's Cube puzzles and algorithms for solving them.
It supports various cube sizes and can generate random scrambles.
JCube can be used in Java applications or as a standalone command-line tool.
It is open source and available on GitHub.
Regression testing is the process of testing changes made to a software application to ensure that existing functionality still works.
It is performed after making changes to the software
It ensures that existing functionality is not affected by the changes
It helps to catch any defects or bugs that may have been introduced
It can be automated using testing tools
Examples include retesting after bug fixes, testing after new
Software engineering principles are the best practices and guidelines for developing high-quality software.
Software should be designed with modularity and scalability in mind.
Code should be well-documented and easy to read.
Testing and debugging should be an integral part of the development process.
Version control should be used to manage code changes.
Security and privacy should be considered throughout the development
A Singleton class is a class that can only have one instance at a time.
It restricts the instantiation of a class to a single object.
It provides a global point of access to that instance.
It is often used in situations where a single object is required to coordinate actions across a system.
Example: Database connection manager, Configuration manager, Logger manager.
Testing principles ensure software quality, while design principles guide software development.
Testing principles include unit testing, integration testing, and acceptance testing.
Design principles include SOLID, DRY, and KISS.
Testing principles ensure that software meets requirements and is free of defects.
Design principles guide software development to be modular, maintainable, and scalable.
I have the necessary skills, experience, and passion to contribute to VISA's success.
I have a strong background in software development and have worked on projects similar to those at VISA.
I am a quick learner and can adapt to new technologies and programming languages easily.
I am passionate about creating high-quality software that meets the needs of users and exceeds their expectations.
I am a team player and can work...
A profile that challenges me to learn and grow while allowing me to contribute to a team.
A position that encourages continuous learning and development
A role that allows me to collaborate with a team and contribute to projects
A company culture that aligns with my values and work ethic
I am interested in exploring new opportunities and challenges that this company can offer.
I am impressed with the company's reputation and growth potential.
I am excited about the projects and technologies this company is working on.
I believe this company can provide me with a better work-life balance and career growth opportunities.
I am looking for a company culture that aligns with my values and goals.
I am open to exp...
Autocomplete in IDEs helps developers write code faster by suggesting code snippets and completing code as they type.
Autocomplete should suggest code snippets based on the context of the code being written
Autocomplete should prioritize suggestions based on frequency of use
Autocomplete should also suggest variable and function names
Autocomplete should be customizable to allow for user-defined snippets and suggestions
Exa...
My weakness is public speaking.
I tend to get nervous when speaking in front of large groups.
I am working on improving my public speaking skills by practicing and seeking feedback.
I have taken courses and attended workshops to help me overcome my fear of public speaking.
Comparing 2 basketball game scenarios with different number of trials and baskets required to win
Calculate the probability of winning in each game scenario using binomial distribution formula
Compare the probabilities to determine which game scenario is preferable
In game1, the probability of winning is p. In game2, the probability of winning is the sum of probabilities of making 2 or 3 baskets
If p is high, game1 is pref...
I applied via Campus Placement and was interviewed in Dec 2016. There were 5 interview rounds.
Implement Binary Search Tree using given array of strings.
Sort the array in ascending order
Find the middle element and make it the root of the tree
Recursively create left and right subtrees using the left and right halves of the array
Repeat until all elements are added to the tree
Print the given Binary search tree in ascending order
Traverse the left subtree recursively
Print the root node
Traverse the right subtree recursively
Find buy and sell points for maximum profit in an array of stock prices in O(n)
Iterate through the array and keep track of the minimum price seen so far
Calculate the profit at each index by subtracting the minimum price from the current price
Update the maximum profit and buy/sell points accordingly
Return the buy and sell points for maximum profit
Chennai faces problems related to water scarcity, traffic congestion, and pollution.
Water scarcity due to inadequate rainfall and poor management of water resources.
Traffic congestion due to the increasing number of vehicles and poor road infrastructure.
Pollution caused by industries, vehicular emissions, and improper waste disposal.
Need more context on the question to provide an answer.
Please provide more information on the problem to be solved.
Without context, it is difficult to provide a solution.
Can you please provide more details on the problem statement?
Visa is a global payments technology company that connects consumers, businesses, banks and governments in more than 200 countries and territories.
Visa operates the world's largest retail electronic payments network.
VisaNet, the company's global processing system, handles more than 65,000 transaction messages a second.
Visa is constantly innovating to improve payment security and convenience, with initiatives such as Vi...
Developed a web application using Python and Django framework for managing inventory and sales.
Used Python programming language for backend development
Implemented Django framework for building web application
Designed database schema for inventory and sales data
Integrated frontend using HTML, CSS, and JavaScript
Implemented user authentication and authorization features
based on 2 reviews
Rating in categories
Team Lead
2.3k
salaries
| ₹2 L/yr - ₹9.5 L/yr |
Senior Software Engineer
1.4k
salaries
| ₹10 L/yr - ₹35 L/yr |
Software Engineer
1.4k
salaries
| ₹6 L/yr - ₹23 L/yr |
Sales Executive
967
salaries
| ₹1 L/yr - ₹6 L/yr |
Senior Associate
914
salaries
| ₹2.2 L/yr - ₹9 L/yr |
BharatPe
Zerodha
Razorpay
Mobikwik