Filter interviews by
Efficiently sort a list after multiple queries using optimal algorithms and data structures.
Use a sorting algorithm like QuickSort or MergeSort for initial sorting.
For multiple queries, consider using a data structure like a balanced BST or a Segment Tree.
Example: If you have a list of numbers and need to sort them after each insertion, a balanced BST can maintain order efficiently.
For static lists with many queri...
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 betwee...
Object Oriented Programming is a programming paradigm that uses objects to represent real-world entities.
Encapsulation: bundling data and methods that operate on that data within one unit
Inheritance: creating new classes from existing ones, inheriting their properties and methods
Polymorphism: ability of objects to take on multiple forms or behaviors
Abstraction: hiding complex implementation details and providing a...
Abstraction is hiding implementation details while polymorphism is using a single interface for multiple types.
Abstraction: Encapsulation, Interfaces, Abstract classes
Polymorphism: Method Overloading, Method Overriding, Interfaces
Abstraction Example: Car - we don't need to know how the engine works to drive it
Polymorphism Example: Animal - different animals have different sounds but they all have a 'makeSound' met...
PayPal is an online payment system that allows individuals and businesses to transfer funds electronically.
Allows users to make payments and money transfers online
Offers a secure and convenient way to pay for goods and services
Provides a platform for businesses to accept payments online
Offers buyer and seller protection for eligible transactions
Can be used to send and receive money internationally
Thresholding is a technique in machine learning used to classify data based on a defined cutoff value.
Thresholding converts continuous data into discrete classes.
Example: In image processing, pixels above a certain intensity are classified as 'foreground'.
In binary classification, a threshold can determine if an output is 'positive' or 'negative'.
Choosing the right threshold is crucial for model performance; it ca...
Design classes for a simple library management system with books and users.
Class Book: Attributes include title, author, ISBN, and availability status.
Class User: Attributes include name, user ID, and a list of borrowed books.
Class Library: Methods to add/remove books, register users, and manage book loans.
Example: Book class could have a method to check availability before loaning.
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 c...
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 exists, 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.
Given an N*M matrix filled with integer numbers, determine the maximum sum that can be obtained from a path starting from any cell in the first row to any cell in the last row.
...Find the maximum sum that can be obtained from a path in a matrix from the first row to the last row.
Use dynamic programming to keep track of the maximum sum at each cell in the matrix.
Start from the second row and update each cell with the maximum sum from the cell above and diagonally above left or right.
The maximum sum at the last row will be the answer for each test case.
I appeared for an interview in Mar 2025, where I was asked the following questions.
I applied via Walk-in and was interviewed in May 2024. There was 1 interview round.
Efficiently sort a list after multiple queries using optimal algorithms and data structures.
Use a sorting algorithm like QuickSort or MergeSort for initial sorting.
For multiple queries, consider using a data structure like a balanced BST or a Segment Tree.
Example: If you have a list of numbers and need to sort them after each insertion, a balanced BST can maintain order efficiently.
For static lists with many queries, p...
LRU cache with multi level caching involves implementing a cache with multiple levels of storage, where the least recently used items are evicted first.
Implement a two-level cache system with a primary cache (e.g. in-memory) and a secondary cache (e.g. disk-based).
Use a data structure like a doubly linked list and a hash map to efficiently manage the cache and track the least recently used items.
When an item is accesse...
I appeared for an interview before May 2021.
Round duration - 60 minutes
Round difficulty - Hard
It was on hackerearth platform and duration was 60 mins.
Given an N*M matrix filled with integer numbers, determine the maximum sum that can be obtained from a path starting from any cell in the first row to any cell in the last row...
Find the maximum sum that can be obtained from a path in a matrix from the first row to the last row.
Use dynamic programming to keep track of the maximum sum at each cell in the matrix.
Start from the second row and update each cell with the maximum sum from the cell above and diagonally above left or right.
The maximum sum at the last row will be the answer for each test case.
Round duration - 60 minutes
Round difficulty - Easy
Only problem solving was asked simple DSA based questions
Given a string 'STR' consisting solely of the characters “{”, “}”, “(”, “)”, “[” and “]”, determine if the parentheses are balanced.
The first line contains an...
Check if given strings with parentheses are balanced or not.
Use a stack to keep track of opening parentheses
Iterate through the string and push opening parentheses onto the stack
When a closing parenthesis is encountered, pop from the stack and check if it matches the closing parenthesis
If stack is empty at the end and all parentheses are matched, the string is balanced
Round duration - 60 mins
Round difficulty - Easy
Problem solving and DSA
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 exists, 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 - 30 minutes
Round difficulty - Easy
This was hiring manager round and it was mostly behavioural round
Tip 1 : DSA/Problem Solving is a must
Tip 2 : Be comfortable with atleast one language with the proper syntax
Tip 3 : Give mock interviews for practice
Tip 1 : Mention your achievements like Google Kickstart or ratings in different coding platforms
Tip 2 : Mention good projects
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
Object Oriented Programming is a programming paradigm that uses objects to represent real-world entities.
Encapsulation: bundling data and methods that operate on that data within one unit
Inheritance: creating new classes from existing ones, inheriting their properties and methods
Polymorphism: ability of objects to take on multiple forms or behaviors
Abstraction: hiding complex implementation details and providing a simp...
Abstraction is hiding implementation details while polymorphism is using a single interface for multiple types.
Abstraction: Encapsulation, Interfaces, Abstract classes
Polymorphism: Method Overloading, Method Overriding, Interfaces
Abstraction Example: Car - we don't need to know how the engine works to drive it
Polymorphism Example: Animal - different animals have different sounds but they all have a 'makeSound' method
Design classes for a simple library management system with books and users.
Class Book: Attributes include title, author, ISBN, and availability status.
Class User: Attributes include name, user ID, and a list of borrowed books.
Class Library: Methods to add/remove books, register users, and manage book loans.
Example: Book class could have a method to check availability before loaning.
PayPal is an online payment system that allows individuals and businesses to transfer funds electronically.
Allows users to make payments and money transfers online
Offers a secure and convenient way to pay for goods and services
Provides a platform for businesses to accept payments online
Offers buyer and seller protection for eligible transactions
Can be used to send and receive money internationally
Thresholding is a technique in machine learning used to classify data based on a defined cutoff value.
Thresholding converts continuous data into discrete classes.
Example: In image processing, pixels above a certain intensity are classified as 'foreground'.
In binary classification, a threshold can determine if an output is 'positive' or 'negative'.
Choosing the right threshold is crucial for model performance; it can aff...
I am excited to join PayPal because of its innovative culture and impact on the global economy.
PayPal's commitment to innovation aligns with my passion for staying up-to-date with the latest technologies.
I am impressed by PayPal's global reach and impact on the economy, and I want to be a part of that.
I appreciate PayPal's focus on diversity and inclusion, and I believe in the importance of working for a company with s...
I appeared for an interview before Jan 2021.
Round duration - 60 minutes
Round difficulty - Easy
I couldn't find an optimal approach to the first question, so she skipped that question and proceeded to next questions. Remaining questions I have answered satisfactorily.
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 with a particular sum exists
Iterate through the array and update the 2D array accordingly
Check if the value at the end of the iteration is true for the given K
Given an undirected and disconnected graph G(V, E) where V vertices are numbered from 0 to V-1, and E represents edges, your task is to output the BFS traversal starting from the ...
BFS traversal in a disconnected graph starting from vertex 0.
Implement BFS algorithm to traverse the graph starting from vertex 0.
Use a queue to keep track of visited nodes and their neighbors.
Ensure to print the traversal sequence in the correct order.
Handle disconnected components by checking for unvisited nodes.
Follow the BFS approach of exploring neighbors before moving to the next level.
Round duration - 60 minutes
Round difficulty - Easy
I told that my strength is problem solving and I can always find a way when there is a bottle-neck. Gave some examples of my experiences while doing my assignments.
Given a string STR
consisting of words separated by spaces, your task is to replace all spaces between words with the characters "@40".
The first line contains an integ...
Replace spaces in a string with '@40'.
Iterate through each character in the string
Replace spaces with '@40'
Return the modified string
Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
I appeared for an interview before Jan 2021.
Round duration - 60 minutes
Round difficulty - Easy
Technical Interview Round with questions based on Data structures, OOPS and SQL.
You are provided with a linked list of integers. Your task is to implement a function that deletes a node located at a specified position 'POS'.
The first line co...
Implement a function to delete a node from a linked list at a specified position.
Traverse the linked list to find the node at the specified position.
Update the pointers of the previous and next nodes to skip the node to be deleted.
Handle edge cases such as deleting the head or tail of the linked list.
Ensure to free the memory of the deleted node to avoid memory leaks.
SQL query to find the nth highest salary
Use the ORDER BY clause to sort salaries in descending order
Use the LIMIT and OFFSET clauses to skip the first n-1 highest salaries
Combine the above steps in a single query to find the nth highest salary
OOP is a programming paradigm based on the concept of objects, which can contain data in the form of fields and code in the form of procedures.
OOP focuses on creating objects that interact with each other to solve problems.
Key concepts include encapsulation, inheritance, and polymorphism.
Encapsulation involves bundling data and methods that operate on the data into a single unit.
Inheritance allows classes to inherit at...
Round duration - 60 minutes
Round difficulty - Easy
Was asked me about my favorite technologies, What i liked about Facebook. And asked me to design a cinema ticket reservation web site like the one satyam has.
Given an array containing N
distinct positive integers and a number K
, determine the Kth largest element in the array.
N = 6, K = 3, array = [2, 1, 5, 6, 3, ...
Find the Kth largest element in an array of distinct positive integers.
Sort the array in non-increasing order and return the Kth element.
Handle multiple test cases efficiently.
Ensure all elements in the array are distinct.
Virtual functions are functions in a base class that are overridden in derived classes to achieve runtime polymorphism.
Virtual functions are declared in a base class with the 'virtual' keyword.
They are overridden in derived classes using the 'override' keyword.
They allow a function to be called based on the runtime type of an object.
Virtual functions enable dynamic binding and late binding in C++.
Example: virtual void ...
Design a Cinema Ticket Reservation System
Use a database to store movie information, showtimes, and seat availability
Allow users to search for movies, select showtimes, and choose seats
Implement a payment system for ticket purchases
Send confirmation emails with QR codes for ticket validation
You can find a defective ball among 10 given balls in 2 attempts using a two-pan balance scale.
Divide the 10 balls into two groups of 5 each.
Weigh the two groups on the balance scale.
If one group is heavier, it contains the defective ball. If they are equal, the defective ball is in the remaining 5 balls.
Divide the group of 5 balls with the defective one into two groups of 2 and 3 balls.
Weigh the two groups on the bala...
Round duration - 30 minutes
Round difficulty - Easy
HR round that lasted for about 30 minutes. The interviewer asked me questions to know more about me and a puzzle.
Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
I appeared for an interview before Jan 2021.
Round duration - 90 minutes
Round difficulty - Medium
It was conducted in Hacker rank which consisted of 10 aptitude questions that included C, C++, Java MCQ. 2 programming questions were also given.
Given an N x M
matrix filled with integers, determine the minimum sum obtainable from a path that starts at a specified cell (x, y)
and ends at the top left corner of t...
The problem involves finding the minimum sum path from a specified cell to the top left corner of a matrix.
Start from the specified cell and calculate the minimum sum path to reach the top left corner using dynamic programming.
Consider the three possible moves: down, right, and down-right diagonal.
Keep track of the minimum sum at each cell and update it based on the minimum of the three possible moves.
Finally, the mini...
Given an integer N
representing the number of pairs of parentheses, find all the possible combinations of balanced parentheses using the given number of pairs.
Generate all possible combinations of balanced parentheses for a given number of pairs.
Use backtracking to generate all possible combinations of balanced parentheses.
Keep track of the number of open and close parentheses used in each combination.
Recursively generate combinations by adding open parentheses if there are remaining, and closing parentheses if the number of open parentheses is greater than the number of clo...
Round duration - 60 minutes
Round difficulty - Medium
Technical round with questions based on data structures, oops and networking.
Create a program that counts and prints the total number of specific character types from user input. Specifically, you need to count lowercase English alphabets, numeric digi...
Create a program to count lowercase alphabets, digits, and white spaces from user input until '$' is encountered.
Read characters from input stream until '$' is encountered
Count lowercase alphabets, digits, and white spaces separately
Print the counts of each character type as three integers separated by spaces
Given an unsorted array containing 'N' integers, you are required to find 'K' largest elements from the array and return them in non-decreasing order.
The fir...
Find K largest elements in an unsorted array and return them in non-decreasing order.
Sort the array in non-decreasing order.
Return the last K elements of the sorted array.
To check internet connection on a system, you can use various methods like pinging a website or checking network status.
Use ping command to check connectivity to a website (e.g. ping www.google.com)
Check network status using network settings or command line tools
Try accessing a website or online service to verify internet connection
When you type a URL in a web browser, the browser sends a request to the server hosting the website, which then responds with the necessary files to display the webpage.
Browser checks cache for DNS resolution
If not found, browser sends a DNS query to resolve the domain name to an IP address
Browser establishes a TCP connection with the server
Browser sends an HTTP request to the server for the webpage
Server processes the...
Round duration - 60 minutes
Round difficulty - Medium
Technical round with questions based on data structures, oops and networking.
Ninja is learning about sorting algorithms, specifically those that do not rely on comparisons. Can you help Ninja implement the counting sort algorithm?
Implement counting sort algorithm to sort an array of integers without comparisons.
Count the frequency of each element in the input array.
Calculate the prefix sum of frequencies to determine the position of each element in the sorted array.
Place each element in its correct position based on the prefix sum.
Time complexity of counting sort is O(n+k), where n is the number of elements and k is the range of input.
Example: ...
The Fibonacci series has applications in various fields such as mathematics, computer science, art, and nature.
Used in algorithms for optimization problems and dynamic programming.
Found in nature, such as the arrangement of leaves on a stem, the branching of trees, and the spiral shapes of shells.
Applied in financial markets for predicting stock prices and analyzing market trends.
Utilized in art and design for creating...
Round duration - 30 minutes
Round difficulty - Easy
HR round where the interviewer asked questions to know more about me.
Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
Top trending discussions
I appeared for an interview before Sep 2020.
Round duration - 70 minutes
Round difficulty - Medium
Timing: 6:00 pm
3 coding questions of medium to be solved in 70 minutes.
Given an array of numbers, the task is to find the maximum sum of any contiguous subarray of the array.
The first line of input contains the size of the arr...
Find the maximum sum of any contiguous subarray in an array of numbers in O(N) time.
Use Kadane's algorithm to find the maximum subarray sum in O(N) time.
Initialize two variables: maxEndingHere and maxSoFar to keep track of the maximum sum.
Iterate through the array and update the variables accordingly.
Return the maxSoFar as the result.
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.
Use a queue for level order traversal to efficiently find the nearest leaf node.
Calculate the distance from node 'X' to each leaf node and return the minimum distance.
You are given a grid containing oranges where each cell of the grid can contain one of the three integer values:
Find the minimum time required to rot all fresh oranges in a grid.
Use Breadth First Search (BFS) to simulate the rotting process of oranges.
Track the time taken to rot all fresh oranges and return the result.
If any fresh oranges remain after simulation, return -1 as it is impossible to rot all oranges.
Round duration - 45 minutes
Round difficulty - Medium
Timing: 2:00 pm
Online round over google meet, code at google docs.
The interviewer was friendly, encouraging, and humble.
Given a non-decreasing sorted array ARR
of N
positive numbers, determine the smallest positive integer that cannot be expressed as the sum of elements from...
The task is to find the smallest positive integer value that cannot be represented as a sum of elements of any proper subset of the given array.
The array is sorted in non-decreasing order, so we can iterate through the array and keep track of the maximum sum we can form.
If the current element is greater than the maximum sum + 1, then the maximum sum + 1 is the smallest positive integer that cannot be represented.
If all...
Round duration - 45 minutes
Round difficulty - Medium
Timing: 2:00 pm
Online round over google meet, code at google docs.
The interviewer was not speaking much. It was a bit strange.
Your task is to identify and return the bottom right view of a given binary tree.
This involves viewing the binary tree from an angle of 45 degrees from...
Identify and return the bottom right view of a given binary tree by viewing it from an angle of 45 degrees from the bottom right side.
Traverse the binary tree in a right-to-left manner and keep track of the last node encountered at each level.
Use a queue for level order traversal and update the result array with the last node at each level.
Return the result array sorted in ascending order as the bottom right view of th...
Round duration - 30 Minutes
Round difficulty - Easy
Timing: 7:00 pm
The interviewer was friendly and in a bit of a hurry.
Tip 1 : DSA is the key. Starting from scratch, one can become proficients in a couple of months.
Tip 2 : Solve questions just a bit outside your comfort zone. Solve too easy to too hard questions is not of any use.
Tip 3 : Be consistent, make a habit of following good coding practices.
Tip 4 : Get to know the ins and out of your projects. You must be very confident while explaining those.
Tip 5 : Don't just directly to system-design, brush up on OOPS principles, networks, OS, DBMS before that.
Tip 1: Keep it crisp and to the point. Make bullet points.
Tip 2: Bold the things you want to be paid attention to. Use numbers rather than vague sentences.
Tip 3: Only put the things you are confident about.
Tip 4: Don't put things irrelevant to the job, it only dilutes the main content.
based on 2 interview experiences
Difficulty level
Duration
based on 12 reviews
Rating in categories
Software Engineer2
344
salaries
| ₹22.2 L/yr - ₹40 L/yr |
Software Engineer
340
salaries
| ₹19.1 L/yr - ₹41.7 L/yr |
Senior Software Engineer
299
salaries
| ₹24 L/yr - ₹42 L/yr |
Software Engineer III
281
salaries
| ₹30 L/yr - ₹51 L/yr |
Data Scientist
267
salaries
| ₹28 L/yr - ₹50 L/yr |
Paytm
Razorpay
Visa
MasterCard