Uber
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by
Clear (1)
I applied via Campus Placement and was interviewed in Mar 2024. There were 2 interview rounds.
Graphs ,arrays , Hashmaps and Heaps
Changes on graph structure involve adding, removing, or modifying nodes and edges.
Adding a new node to the graph
Removing an existing node from the graph
Modifying the weight of an edge in the graph
I was interviewed in Dec 2020.
Round duration - 90 minutes
Round difficulty - Easy
This round had 2 coding problems and we had to code it on hackerearth only.
The use of Outside IDE was forbidden.
The timing of test was 12:00 PM to 1:30 PM.
Ninja is tasked with organizing a meeting in an office that starts at time ‘0’ and ends at time ‘LAST’. There are ‘N’ presentations scheduled with given start and end times....
Reschedule at most K presentations to maximize gap without overlap.
Iterate through presentations and calculate the gaps between them
Sort presentations by end time and reschedule K presentations to maximize gap
Return the longest gap achieved
You are located at point ‘A’, the top-left corner of an M x N matrix, and your target is point ‘B’, the bottom-right corner of the same matrix. Your task is to calcula...
Calculate total unique paths from top-left to bottom-right corner of a matrix by moving only right or down.
Use dynamic programming to solve this problem efficiently.
Create a 2D array to store the number of unique paths for each cell.
Initialize the first row and first column with 1 as there is only one way to reach them.
For each cell, the number of unique paths is the sum of paths from the cell above and the cell to the...
Round duration - 90 minutes
Round difficulty - Medium
This round was coding round with discussion .
The interviewer tried to trick the questions and wanted to test how we respond if something is asked out of preparation.
The code we ran on Google Docs was checked on Online IDE if it ran for sample inputs.
Timing : 12:00 PM to 1:30 PM
You are given a graph with 'N' vertices labeled from 1 to 'N' and 'M' edges. In one operation, you can shift an edge from being between two directly connected vertice...
Determine the minimum number of operations to connect a graph by shifting edges between disconnected vertices.
Use a disjoint set union (DSU) data structure to keep track of connected components.
Count the number of connected components in the graph.
The minimum number of operations required is equal to the number of connected components minus 1.
Given a 'Snake and Ladder' board with N rows and N columns, where positions are numbered from 1 to (N*N) starting from the bottom left, alternating direction each row, f...
Find the minimum number of dice throws required to reach the last cell on a 'Snake and Ladder' board.
Use Breadth First Search (BFS) algorithm to find the shortest path on the board.
Create a mapping of each cell to its corresponding row and column on the board.
Consider the presence of snakes and ladders while calculating the next possible moves.
Handle the case where the last cell is unreachable by returning -1.
Optimize ...
Round duration - 75 minutes
Round difficulty - Hard
This was a problem solving round and lasted for 75 minutes. The interviewer gave me a very complicated question.
The round was held on Google Meet and I was supposed to tell him the approach and write code on shared Google Docs.
Assume you initially have an empty array called ARR
. You are required to return the updated array after executing Q
number of queries on this array.
There are two types of que...
Implement a function to update an array based on XOR queries.
Create an empty array to store the elements.
Iterate through each query and update the array accordingly.
Use bitwise XOR operation to update the elements.
Ensure to handle both types of queries - insert and XOR operation.
Tip 1 : prepare all Topics from Coding Ninjas of Course Competitive Programming. Also I practiced atleast one question everyday from sites like Leetcode,Interviewbit and also took part in Codeforces Contest.
Tip 2 : Though Data Structure is the base for any tech interview, one must know some other subjects as well like Operating System, Networking, and Database Management System for which I took help from Coding Ninja’s notes and from GeeksforGeeks.
Tip 1 : Keep your resume up to date and mention 2-3 good level projects which will give a good impression to the interviewer .
Tip 2 : Don't put false things on the resume.
I was interviewed before Sep 2020.
Round duration - 90 minutes
Round difficulty - Medium
There were a total of three questions of 100, 200, and 300 points respectively. Partial points were given if partial tests got passed for any problem. The Codesignal environment was similar to Hackerrank, so not much different. I think the test was held in the afternoon time.
Two players, 'Ale' and 'Bob', are playing a game with a pile of stones. Your task is to determine the winner if both play optimally.
1. On each turn, ...
Determining the winner of a game where two players take turns to remove stones from a pile based on certain rules.
Implement a recursive function to simulate the game where each player makes the optimal move.
Check if the current player can take any stones, if not, the other player wins.
Return 'Ale' if 'Ale' wins, otherwise return 'Bob'.
Given an integer array 'ARR' of size 'N' and an integer 'K', return all the subsets of 'ARR' which sum to 'K'.
A subset of an array 'ARR' is a tupl...
Given an array and an integer, return all subsets that sum to the given integer.
Use backtracking to generate all possible subsets of the array.
Keep track of the current subset and its sum while backtracking.
If the sum of the subset equals the target sum, add it to the result.
Recursively explore both including and excluding the current element in the subset.
Sort the elements in each subset to ensure increasing order of
Round duration - 60 minutes
Round difficulty - Medium
This round was a video call round held on Zoom and the Codesignal platform was to be used for coding the problems. The round started with the interviewer giving a small introduction about him and then asking me to introduce myself.
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 oranges and return -1 if any fresh oranges remain.
Handle edge cases such as empty grid, no fresh oranges, or no rotten oranges.
Update the status of adjacent fresh oranges to rotten oranges in each iteration.
Given an integer array arr
of size N
, your task is to determine all indices of local minima and local maxima within the array. Return these indices in a 2-D list, ...
Find indices of local minima and maxima in an integer array.
Iterate through the array and compare each element with its neighbors to find local minima and maxima.
Consider corner elements separately by comparing with only one neighbor.
Return the indices of local minima and maxima in a 2-D list.
Round duration - 60 minutes
Round difficulty - Medium
The setup was exactly similar to the first interview round. The interviewer was very friendly. My advice will be to see the interviewer as a team mate and think you have to solve the question together with him. Don't panic and start speaking out what observations you can make about the problem.
Given an array or list ARR
of N
positive integers and an integer K
, your task is to rearrange all elements such that those with the K-th
bit (considering the rightmost bit as '1st' bit) eq...
Rearrange elements in an array based on the K-th bit being 0 or 1.
Iterate through the array and separate elements based on the K-th bit being 0 or 1.
Maintain the relative order of elements within each group.
Combine the two groups to get the final rearranged array.
Time complexity can be optimized to linear time by using bitwise operations.
Example: For ARR = {1, 2, 3, 4} and K = 1, output should be {2, 4, 1, 3}.
Round duration - 60 minutes
Round difficulty - Medium
It was already night time till this interview started because all the three interview rounds were held on the same day. This was not a DS+Algorithms round. He first asked me to introduce myself. So I started by telling what all I have done in my college up till now and then I told him about my internship experience at myKaarma which just ended few days back. There was around 10-15 minutes discussion on what I was working on in my intern project.
Tip 1 : Try to learn DS+Algorithms from the basics in the starting phase of your preparation. Though, in the later stages of the preparation, some cramming can be employed for the problems generally asked in the interviews (but that too with proper understanding)
Tip 2 : Don't forget to prepare topics like OS and OOP. Although I was not asked much about these topics but my friends were asked some questions from these topics. These topics can be prepared in 2-3 days from YouTube itself.
Tip 3 : For an intern role interview, 2-3 projects including the college projects should be enough. You should be prepared to explain your project answer the basic questions like the approach which you followed, the problems you faced during the project, etc.
Tip 4 : If possible you can have a prior intern experience as well, but one thing for sure, preparing DS+Algorithms is much more important than this.
Tip 1 : Writing things which you don't know about properly won't give you much benefit. Rather, they can get you into problem if asked about them.
Tip 2 : Writing much about the things like extra curricular activities in the resume for software roles don't give you much benefit in my opinion. Though I wrote 2-3 PORs which had.
Tip 3 : Trying to make your resume longer unnecessarily won't give you any benefit.
Top trending discussions
I applied via Company Website and was interviewed in May 2021. There was 1 interview round.
I was interviewed in Dec 2020.
Round duration - 25 Minutes
Round difficulty - Medium
Very friendly interviewer. Although waiting time was very high
You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to find and return a list of all pairs of elements where each sum of a pair equals 'S'.
Find pairs of elements in an array that sum up to a given value, sorted in a specific order.
Iterate through the array and for each element, check if the complement (S - current element) exists in a hash set.
If the complement exists, add the pair to the result list.
Sort the result list based on the criteria mentioned in the question.
Return the sorted list of pairs.
Tip 1 : be confident about your CV points
Tip 2 : practice consulting cases and how to answer situational questions
Tip 1 : be crisp about achievement
Tip 2 : add data points to support your achievements
I was interviewed before Sep 2020.
Round duration - 90 minutes
Round difficulty - Easy
This is a written round on paper for everyone. Three coding questions were given. Two out of three must be correct covering every single edge case to qualify for the next round. Only the most optimal solution was to be considered.
Given an array arr
of length N
consisting of integers, find the sum of the subarray (including empty subarray) with the maximum sum among all subarrays.
Find the sum of the subarray with the maximum sum among all subarrays in an array of integers.
Iterate through the array and keep track of the maximum sum subarray encountered so far.
Use Kadane's algorithm to efficiently find the maximum subarray sum.
Consider the sum of an empty subarray as 0.
Example: For input arr = [-2, 1, -3, 4, -1], the maximum subarray sum is 4.
You are given 'N' ropes, each of varying lengths. The task is to connect all ropes into one single rope. The cost of connecting two ropes is the sum of their lengths. Yo...
Connect ropes with minimum cost by merging two smallest ropes at a time.
Sort the array of rope lengths in ascending order.
Merge the two smallest ropes at a time and update the cost.
Repeat the process until all ropes are merged.
Return the total cost as the minimum cost to connect all ropes.
Given a binary tree, your task is to print the left view of the tree.
The input will be in level order form, with node values separated by a...
Print the left view of a binary tree given in level order form.
Traverse the tree level by level and print the first node encountered at each level
Use a queue to perform level order traversal
Keep track of the level while traversing the tree
Round duration - 50 minutes
Round difficulty - Easy
This was face to face interview round.
You are given a Binary Tree of integers and an integer 'X'. Your task is to find all the triplets in the tree whose sum is strictly greater than 'X'. Th...
Find all triplets in a binary tree whose sum is greater than a given integer X, with a grandparent-parent-child relationship.
Traverse the binary tree to find all possible triplets with the required relationship.
Keep track of the sum of each triplet and compare it with the given integer X.
Return the triplets that satisfy the condition in any order.
Ensure each triplet follows the format (grand-parent, parent, child).
A thief is planning to steal from several houses along a street. Each house has a certain amount of money stashed. However, the thief cannot loot two adjacent houses. Determi...
Determine the maximum amount of money a thief can steal from houses without looting two consecutive houses.
Use dynamic programming to keep track of the maximum amount of money that can be stolen up to each house.
At each house, the thief can either choose to steal from the current house or skip it and steal from the previous house.
The maximum amount of money that can be stolen at the current house is the maximum of the ...
Round duration - 60 minutes
Round difficulty - Easy
This was face to face interview round.
Tip 1 : Participate in live contests on websites like Codechef, Codeforces, etc as much as possible.
Tip 2 : Practice previous interview questions from LeetCode, GeeksForGeeks.
Tip 3 : Revise Computer Science subjects like DBMS, OOPS thoroughly.
Only write those things in the resume which you are confident of and keep practicing.
Final outcome of the interviewRejectedI was interviewed before Sep 2020.
Round duration - 180 minutes
Round difficulty - Easy
The online round consisted of 2 coding questions based on data structures and algorithms, 30 aptitude MCQs, 30 behavioral MCQs and 10 code snippets to debug. The coding questions were of medium level, aptitude MCQs were easy and the code snippets to debug was also of easy level. Each section was timed.
You are provided with a singly linked list of integers. Your task is to determine whether the given singly linked list is a palindrome. Return true
if it is a pali...
Check if a given singly linked list is a palindrome or not.
Use two pointers approach to find the middle of the linked list
Reverse the second half of the linked list
Compare the first half with the reversed second half to determine if it's a palindrome
You are located at point ‘A’, the top-left corner of an M x N matrix, and your target is point ‘B’, the bottom-right corner of the same matrix. Your task is to calcula...
Calculate total unique paths from top-left to bottom-right corner of a matrix by moving only right or down.
Use dynamic programming to solve this problem efficiently.
Create a 2D array to store the number of unique paths for each cell.
Initialize the first row and first column with 1 as there is only one way to reach them.
For each cell, the number of unique paths is the sum of the paths from the cell above and the cell to...
Round duration - 50 minutes
Round difficulty - Easy
The interview was early in the morning at 9 am. We turned on our videos and the interviewer asked for my introduction. She was helpful and provided me with hints whenever I needed. The interview was taken on Amazon chime and she also shared a link where I can write the code. It could be editable by both of us.
You are provided with a 2-dimensional matrix having N
rows and M
columns, containing only 1s (land) and 0s (water). Your goal is to determine the number of islands in t...
Count the number of islands in a 2D matrix of 1s and 0s.
Use Depth First Search (DFS) or Breadth First Search (BFS) to traverse the matrix and identify connected groups of 1s.
Maintain a visited array to keep track of visited cells to avoid redundant traversal.
Increment the island count each time a new island is encountered.
Tip 1 : You must confidence over Data Structures and its concepts. Pick one coding platform and try to practice at least 5-6 coding questions everyday. I completed around 200+ questions on Leetcode, 200+ questions on Geek For Geeks.
Tip 2 : Not attempting the question is enough. try to analyze its time and space complexity. See, if you can further optimize your solution. Sometimes the interviewer asks only one question and keep on increasing its difficulty by asking for its optmization.
Tip 3 : Apart from coding questions keep studying concepts of Operating Systems, databases and object oriented programming. You can always refer to Geeks For Geeks articles for it. Also, Coding Ninja's Data Structures and algorithms course in C++ helped me a lot in improving my OOPS concepts specifically.
Tip 1 : Do not mention any skills, projects or achievements which you haven't completed yourselves. If you are not able to answer the basic questions it leaves a bad impact.
Tip 2 : You do need to have a lot of projects. Only one good project with proper knowledge is also fine. The same goes for the skills as well.
Tip 3 : Try to write achievements which shows your technical skills, communication skills, leadership quality or teamwork.
I was interviewed before Sep 2020.
Round duration - 90 Minutes
Round difficulty - Medium
This is a written round on paper for everyone. Three coding questions were given. Two out of three must be correct covering every single edge case to qualify for the next round. Only the most optimal solution was to be considered.
Given an array ARR
consisting of N
integers, your goal is to determine the maximum possible sum of a non-empty contiguous subarray within this array.
Find the maximum sum of a contiguous subarray in an array of integers.
Use Kadane's algorithm to find the maximum subarray sum in linear time.
Initialize two variables: maxSum and currentSum.
Iterate through the array and update currentSum by adding the current element or starting a new subarray.
Update maxSum if currentSum becomes greater than maxSum.
Return maxSum as the maximum subarray sum.
Round duration - 50 Minutes
Round difficulty - Easy
This was face to face interview round.
You are given a Binary Tree of integers and an integer 'X'. Your task is to find all the triplets in the tree whose sum is strictly greater than 'X'. Th...
Find all triplets in a binary tree whose sum is greater than a given integer X, with a grandparent-parent-child relationship.
Traverse the binary tree to find all possible triplets.
Check if the sum of each triplet is greater than X.
Ensure the relationship of grandparent-parent-child in each triplet.
Return the valid triplets in any order.
Handle constraints and edge cases appropriately.
Round duration - 60 Minutes
Round difficulty - Easy
FACE TO FACE ROUND INTERVIEW
Mutex is used for exclusive access to a resource by only one thread at a time, while Semaphores can allow multiple threads to access a resource simultaneously.
Mutex is binary and allows only one thread to access a resource at a time, while Semaphores can have a count greater than one.
Mutex is used for protecting critical sections of code, while Semaphores can be used for controlling access to a pool of resources.
Exampl...
Tip 1 : Participate in previous interview questions from leetcode, geeksforgeeks
Tip 2 : Revise computer science subjects like dbms and oops thoroughly
Tip 3 : Participate in live contests on CodeChef, Codeforces
Tip 1 : Only write the things on which you are the most confident about
Final outcome of the interviewRejectedbased on 1 interview
1 Interview rounds
Driver
584
salaries
| ₹0 L/yr - ₹0 L/yr |
CAR Driver
361
salaries
| ₹0 L/yr - ₹0 L/yr |
Software Engineer
157
salaries
| ₹0 L/yr - ₹0 L/yr |
Operations Executive
136
salaries
| ₹0 L/yr - ₹0 L/yr |
Data Analyst
130
salaries
| ₹0 L/yr - ₹0 L/yr |
Amazon
Ola Cabs
Airbnb