i
Paytm
Filter interviews by
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 star...
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.
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: Fo...
Given a singly linked list of integers, return the head of the reversed linked list.
Initial linked list: 1 -> 2 -> 3 -> 4 -> NULL
Reversed linke...
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.
You are given an array ARR
of 'N' integers and a positive integer 'K'.
Your task is to determine the lexicographically smallest array that can be obtaine...
The task is to determine the lexicographically smallest array that can be obtained by performing at most 'K' swaps of consecutive elements.
Sort the array in non-decreasing order and keep track of the number of swaps made.
Iterate through the array and swap adjacent elements if it results in a lexicographically smaller array.
Continue swapping until the maximum number of swaps 'K' is reached or the array is lexicogra...
Given an N * M grid representing a maze with obstacles, compute and return the total number of distinct paths from the top-left cell to the bottom-right cell. A cell in the ...
Find the total number of distinct paths in a maze with obstacles from top-left to bottom-right cell.
Use dynamic programming to keep track of the number of paths to reach each cell.
Handle blocked cells by setting their path count to 0.
Only move right or down from any given cell to calculate the number of paths.
Return the total number of valid paths modulo 10^9 + 7.
Given a sequence of 'N' space-separated non-negative integers A[1], A[2], ..., A[i], ..., A[n], where each number in the sequence represents the height of a line...
Find two lines to form a container with maximum water capacity based on given heights.
Iterate through the array and use two pointers to find the maximum area.
Calculate the area using the formula: min(height[left], height[right]) * (right - left).
Move the pointer with the smaller height towards the center to potentially find a larger area.
You are provided with a list of 'transactions' involving 'n' friends who owe each other money. Each entry in the list contains information about a receiver, sender, and the trans...
Minimize cash flow among friends by optimizing transactions.
Create a graph where nodes represent friends and edges represent transactions.
Calculate net amount each friend owes or is owed by summing up all transactions.
Use a recursive algorithm to minimize cash flow by settling debts between friends.
Update the graph after each settlement and continue until all debts are settled.
Output the minimized cash flow in a 2...
In this problem, you have a one-dimensional garden of length 'N'. Each position from 0 to 'N' has a fountain that can provide water to the garden up to a certain range....
Find the minimum number of fountains to activate to water the entire garden.
Iterate through the array to find the coverage of each fountain.
Keep track of the farthest coverage reached by each activated fountain.
Activate the fountain that covers the farthest distance not yet covered.
Repeat until the entire garden is watered.
Ninja is stuck in a maze represented as a binary tree, and he is at a specific node ‘X’. Help Ninja find the shortest path to the nearest leaf node, which is considered an exi...
Find the minimum distance from a given node to the nearest leaf node in a binary tree.
Traverse the binary tree from the given node 'X' to find the nearest leaf node using BFS or DFS.
Keep track of the distance from 'X' to each leaf node encountered during traversal.
Return the minimum distance found as the output.
Given an array of integers ARR
with length 'N' and an integer 'Target', the task is to find all unique pairs of elements that add up to the 'Target'.
First line: Integer ...
Find all unique pairs of elements in an array that add up to a given target sum.
Use a hashmap to store the difference between the target sum and each element as keys and their indices as values.
Iterate through the array and check if the current element's complement exists in the hashmap.
Return the pairs of elements that add up to the target sum.
Two questions on dynamic programming
This was a behavioural round and was completely non technical
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 - 75 minutes
Round difficulty - Easy
This round was conducted in Hackerrank portal for a total duration of 75 minutes and was divided into 4 sections.
1st Section : Aptitude Section : 14 questions , 28 minutes
2nd Section : Technical Section : 12 questions , 17 minutes
3rd Section :1 coding Questions : 20 minutes+30 minutes
This Round was Conducted on Hackerrank (Webcam Enabled).
Given a sequence of 'N' space-separated non-negative integers A[1], A[2], ..., A[i], ..., A[n], where each number in the sequence represents the height of a lin...
Find two lines to form a container with maximum water capacity based on given heights.
Iterate through the array and use two pointers to find the maximum area.
Calculate the area using the formula: min(height[left], height[right]) * (right - left).
Move the pointer with the smaller height towards the center to potentially find a larger area.
Given an N * M grid representing a maze with obstacles, compute and return the total number of distinct paths from the top-left cell to the bottom-right cell. A cell in the...
Find the total number of distinct paths in a maze with obstacles from top-left to bottom-right cell.
Use dynamic programming to keep track of the number of paths to reach each cell.
Handle blocked cells by setting their path count to 0.
Only move right or down from any given cell to calculate the number of paths.
Return the total number of valid paths modulo 10^9 + 7.
Round duration - 100 minutes
Round difficulty - Medium
This was an Online F2F Technical Round conducted on CodePair : Hackerrank. So, Basically You have to Run and Submit ( Pass All Test cases) in the Interview Round also (Like normal Coding Test) in Codepair : Hackerrank & along with that You should have to explain your Code and Approach to the Interviewers.
The Interviewers were helpful and didn't hesitate in giving hints.
Timing - 10:00 A.M to 12:00 P.M
In this problem, you have a one-dimensional garden of length 'N'. Each position from 0 to 'N' has a fountain that can provide water to the garden up to a certain range...
Find the minimum number of fountains to activate to water the entire garden.
Iterate through the array to find the coverage of each fountain.
Keep track of the farthest coverage reached by each activated fountain.
Activate the fountain that covers the farthest distance not yet covered.
Repeat until the entire garden is watered.
You are provided with a list of 'transactions' involving 'n' friends who owe each other money. Each entry in the list contains information about a receiver, sender, and the tran...
Minimize cash flow among friends by optimizing transactions.
Create a graph where nodes represent friends and edges represent transactions.
Calculate net amount each friend owes or is owed by summing up all transactions.
Use a recursive algorithm to minimize cash flow by settling debts between friends.
Update the graph after each settlement and continue until all debts are settled.
Output the minimized cash flow in a 2-D ma...
Round duration - 30 minutes
Round difficulty - Easy
This was a Telephonic Round (Audio Call). The HR was friendly and asked basic questions.
The timing was 2:00 PM to 2:30 PM.
Tip 1 : Make sure that you are thorough with CS concepts beforehand.
Tip 2 : Even when you are explaining the approach to a question, try to parallelly think about how you would code it.
Tip 3 : Read the previous interview experiences. It would give a fair idea of the kind of questions one should expect.
Tip 4 : Try practicing medium difficulty level coding questions more.
Tip 5 : Practice atleast 200 questions from coding platforms like CodeZen, LeetCode, Interviewbit as they contain common interview questions.
Tip 1 : Mention atleast 1 project and past work experience as it sets good impression.
Tip 2 : Keep your resume up to date for the role you are applying.
Tip 3 : Try to keep your resume of 1 Page.
I appeared for an interview in Dec 2020.
Round duration - 60 Minutes
Round difficulty - Easy
You are given an array ARR
of 'N' integers and a positive integer 'K'.
Your task is to determine the lexicographically smallest array that can be obtain...
The task is to determine the lexicographically smallest array that can be obtained by performing at most 'K' swaps of consecutive elements.
Sort the array in non-decreasing order and keep track of the number of swaps made.
Iterate through the array and swap adjacent elements if it results in a lexicographically smaller array.
Continue swapping until the maximum number of swaps 'K' is reached or the array is lexicographica...
Round duration - 20 Minutes
Round difficulty - Easy
Tip 1 : Try solving Love Babbar 450 Prog questions
Tip 2 : Have a good resume
Tip 3 : Do learn some extra technologies eg. ML/AI
Tip 1 : Do not lie at all
Tip 2 : Have some projects listed
I appeared for an interview before Sep 2020.
Round duration - 70 minutes
Round difficulty - Easy
The first round was the Online Coding Round of 70 minutes with 3 problems of 3 marks, 3 marks, and 4 marks respectively.
The first two questions were easy and the third one was a bit tricky. The round started at 6 PM.
Anyone who is practicing continuously could have solved these questions easily within the time limit. The test cases were also not so hard and distinct. I coded in C++ language.
The questions asked were-
1. Minimum insertions required to make a string palindrome
2. To find the distance of the closest leaf from a node with given data.
3. Add two numbers represented by linked lists
22 students were selected for the next round.
Determine the minimal number of characters needed to insert into a given string STR
to transform it into a palindrome.
STR = "abcaa"
The task is to find the minimum number of characters needed to insert into a given string to make it a palindrome.
Use dynamic programming to find the longest palindromic subsequence of the given string.
Subtract the length of the longest palindromic subsequence from the length of the original string to get the minimum insertions required.
Handle edge cases like an empty string or a string that is already a palindrome.
Exa...
Ninja is stuck in a maze represented as a binary tree, and he is at a specific node ‘X’. Help Ninja find the shortest path to the nearest leaf node, which is considered an ex...
Find the minimum distance from a given node to the nearest leaf node in a binary tree.
Traverse the binary tree from the given node 'X' to find the nearest leaf node using BFS or DFS.
Keep track of the distance from 'X' to each leaf node encountered during traversal.
Return the minimum distance found as the output.
Given two singly linked lists, with each list representing a positive number without leading zeros, your task is to add these two numbers and return the result in the form of a new...
Add two numbers represented by linked lists and return the result as a new linked list.
Traverse both linked lists simultaneously while adding corresponding elements and carry over the sum if needed
Handle cases where one linked list is longer than the other
Create a new linked list to store the sum of the two numbers
Round duration - 80 minutes
Round difficulty - Easy
It was a technical interview. The platform used was google meet for online video calling. The interviewer first introduced himself then asked me to introduce myself. He also asked about my well-being amid the Covid-19 pandemic. He asked me 3 problems from data structures. He put a lot of focus on my project. We discussed about my project for about 20 mins. He asked various questions related to my project and I answered them confidently. After 70-75 mins he said that interview was over and that I may ask him anything. I asked him to give me feedback about my resume and my project. He gave me advice to improve my resume and the interview was over. The first technical interview was easy and was not so challenging as I was prepared.
Given an array of integers ARR
with length 'N' and an integer 'Target', the task is to find all unique pairs of elements that add up to the 'Target'.
First line: Integer...
Find all unique pairs of elements in an array that add up to a given target sum.
Use a hashmap to store the difference between the target sum and each element as keys and their indices as values.
Iterate through the array and check if the current element's complement exists in the hashmap.
Return the pairs of elements that add up to the target sum.
Sort the given array of integers in ascending order using the quick sort algorithm. Quick sort is a divide-and-conquer algorithm where a pivot point is chosen to partition the...
Implement quick sort algorithm to sort an array of integers in ascending order.
Choose a pivot element (e.g., rightmost element) to partition the array into two subarrays.
Recursively apply quick sort on the subarrays until the entire array is sorted.
Time complexity can be optimized to NlogN for worst-case scenarios.
Given a sequence of numbers, denoted as ARR
, your task is to return a sorted sequence of ARR
in non-descending order using the Merge Sort algorithm.
The Merge Sort...
Implement Merge Sort algorithm to sort a sequence of numbers in non-descending order.
Implement the Merge Sort algorithm which involves dividing the array into two halves, sorting each half, and then merging them back together.
Recursively call the Merge Sort function on each half of the array until the base case of having a single element in the array is reached.
Merge the sorted halves back together in a new array in no...
Round duration - 60 minutes
Round difficulty - Medium
This was also a technical round. The interviewer focused on data structures and resume. Apart from some basic questions about my resume, he asked majorly about data structures and algorithms. The interview was an hour long and he asked only 2 problems. Both of them were from trees. In this round, he focused if I can change my approach if a slight change is made in the question. Like he asked me to write code for inorder traversal. Obviously, I used a recursive approach. He then asked me to use the iterative method to find inorder traversal of the tree.
The questions he asked were-
1. Inorder traversal (both recursive and iterative method)
2. Level Order Traversal
( For obvious reasons I knew level order traversal very well. I coded it swiftly, so he asked me to write code for Zig-Zag traversal)
Find the inorder successor of a given node in a binary tree. The inorder successor is the node that appears immediately after the given node during an inorder traversal....
Find the inorder successor of a given node in a binary tree.
Perform an inorder traversal of the binary tree to find the successor of the given node.
If the given node has a right child, the successor will be the leftmost node in the right subtree.
If the given node does not have a right child, backtrack to the parent nodes to find the successor.
Given a binary tree with integer values in its nodes, your task is to print the zigzag traversal of the tree.
In zigzag order, level 1 is printed from left to right...
Implement a function to print the zigzag traversal of a binary tree.
Use a queue to perform level order traversal of the binary tree.
Maintain a flag to switch between printing nodes from left to right and right to left at each level.
Store nodes at each level in a list and reverse the list if the flag is set to print in zigzag order.
Round duration - 50 minutes
Round difficulty - Medium
This was the final round of the Interview process. My interview was scheduled for 7.30 PM. It started at approximately 7.40 PM. The main focus of the interviewer was on my projects and my skills. He asked me many questions regarding my project like what problems I faced, what did you learn from this, apart from developing skills what else did you learn while developing the project, why did you use this tech instead of this, security features, scalability of the project and many more. I answered almost every question as perfectly as I can. Later he asked me some basic questions from NodeJS (as I am a full stack developer). In the end, he asked a puzzle. I didn't know the solution to the puzzle but we discussed it and I figured out the solution.
Tip 1 : Properly grasp Data Structures and Algorithms from basics.
Tip 2 : Learn about Time complexity
Tip 3 : Be honest and walk through your thought process to the interviewer.
Tip 4 : Its always good to be presentable and have good communications skills
Tip 1 : Never Lie on your resume. Only write what you have done and what you know.
Tip 2 : It's good to have one or two projects on your resume. Mention the tech stack you used and a brief description of the project. It will be best if you host/upload your project on the cloud.
Tip 3 : Avoid unnecessary details like Hobbies, family details, declaration, date, signature, etc.
Tip 4 : You're more than a 1-page resume. But your resume should not be more than a page
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...
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
I applied via Campus Placement and was interviewed in Sep 2016. There were 4 interview rounds.
I am a passionate software developer with experience in Java, Python, and web development.
Experienced in Java, Python, and web development technologies
Strong problem-solving skills
Team player with excellent communication skills
My resume highlights my experience in software development and showcases my skills in various programming languages and technologies.
Worked on multiple projects using Java, Python, and C++
Developed web applications using HTML, CSS, and JavaScript
Experience with databases such as MySQL and MongoDB
Familiarity with Agile methodology and version control systems like Git
Participated in hackathons and coding competitions
I want to go for VISA to explore new opportunities and gain international experience.
To gain exposure to different cultures and work environments
To expand my skill set and learn new technologies
To work on challenging projects and contribute to the growth of the company
To build a global network of professionals and enhance my career prospects
A binary tree is a data structure in which each node has at most two children.
Start with a root node
Each node has a left and right child
Nodes can be added or removed
Traversal can be done in-order, pre-order, or post-order
Code a basic linked list
Create a Node class with data and next pointer
Create a LinkedList class with head pointer
Implement methods to add, delete, and search nodes in the linked list
A circular linked list is a data structure where the last node points back to the first node, forming a loop.
Create a Node class with data and next pointer
Initialize the head node and set its next pointer to itself
To add a node, create a new node and set its next pointer to the head node's next pointer, then update the head node's next pointer to the new node
To traverse the circular linked list, start from the head nod...
I applied via Campus Placement and was interviewed in Dec 2016. There were 3 interview rounds.
Find subset of numbers in array that sum up to zero.
Use a nested loop to iterate through all possible subsets.
Calculate the sum of each subset and check if it equals zero.
Store the subset if the sum is zero.
Optimize the solution by using a hash set to store the cumulative sum of elements.
BFS (Breadth-First Search) is a graph traversal algorithm that explores all the vertices of a graph in breadth-first order.
BFS starts at a given vertex and explores all its neighbors before moving to the next level of vertices.
It uses a queue data structure to keep track of the vertices to be visited.
BFS guarantees that it visits all the vertices of a connected graph.
It can be used to find the shortest path between two...
In 5 years, I see myself as a highly skilled software developer, leading a team and contributing to innovative projects.
Continuously improving my technical skills through learning and hands-on experience
Taking on leadership roles and mentoring junior developers
Contributing to the development of cutting-edge software solutions
Building strong relationships with clients and stakeholders
Staying updated with the latest indu...
I applied via Campus Placement
Some of the top questions asked at the Paytm Software Developer interview for freshers -
The duration of Paytm Software Developer interview process can vary, but typically it takes about less than 2 weeks to complete.
based on 1 interview experience
based on 50 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