Uber interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Uber
upvote
share-icon
2 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 Months
Topics: Data Structures, Algorithms, OOPs, DBMS, SQL, Web Development
Tip
Tip

Tip 1 : Do not rush into things. Learning takes time. Focus should be on the concepts and not just on leaving topics half-prepared. Devote 70% of both time and effort to DSA. I solved a total of around 500 questions on sites like GFG and Leetcode. Do not repeat similar questions just to increase the count of the number of questions

Tip 2 : Competitive Programming is a bonus and not a necessity, rather focus on core DSA based problems before trying CP. Do not pursue CP if you do not like it. Devote that extra time to core CS subjects and aptitude preparation.

Tip 3 : Projects play an important role too, do no ignore them. Try to get your hands dirty with a little bit of every field i.e., frontend, backend, and database.

Application process
Where: Campus
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

Tip 1 : Try to make a single-page resume. Highlight skills, projects, and work experience more than CGPA. Ensure proper spacing and font to maintain professionalism.
Tip 2 : Do not lie on a resume. Everything written on your resume must be known by you in and out

Interview rounds

01
Round
Easy
Face to Face
Duration45 Minutes
Interview date15 Nov 2021
Coding problem2

1. Maximum Subarray Sum

Moderate
35m average time
81% success
0/80
Asked in companies
QualcommUberAmazon

You are given an array 'arr' of length 'n', consisting of integers.


A subarray is a contiguous segment of an array. In other words, a subarray can be formed by removing 0 or more integers from the beginning and 0 or more integers from the end of an array.


Find the sum of the subarray (including empty subarray) having maximum sum among all subarrays.


The sum of an empty subarray is 0.


Example :
Input: 'arr' = [1, 2, 7, -4, 3, 2, -10, 9, 1]

Output: 11

Explanation: The subarray yielding the maximum sum is [1, 2, 7, -4, 3, 2].
Problem approach

A sub-optimal code was given in the problem. We had to understand what the code does and then write an optimal code which does the same thing. So the code was for finding the maximum sum subarray which can be done with Kadane's algorithm in O(n).

Try solving now

2. Return Subsets Sum to K

Moderate
40m average time
75% success
0/80
Asked in companies
Thought WorksMicrosoftUber

Given an integer array 'ARR' of size 'N' and an integer 'K', return all the subsets of 'ARR' which sum to 'K'.

Subset of an array 'ARR' is a tuple that can be obtained from 'ARR' by removing some (possibly all) elements of 'ARR'.

Note :
The order of subsets is not important. 

The order of elements in a particular subset should be in increasing order of the index.
Problem approach

Given an integer array 'ARR' of size 'N' and an integer 'K', return all the subsets of 'ARR' which sum to 'K'.
Subset of an array 'ARR' is a tuple that can be obtained from 'ARR' by removing some (possibly all) elements of 'ARR'.

Try solving now
02
Round
Easy
Face to Face
Duration45 minutes
Interview date15 Nov 2021
Coding problem2

1. Find Indices For Local Minimas and Maximas

Easy
10m average time
90% success
0/40
Asked in companies
OlaUberZomentum

Given an array “arr” of “N” integers. Your task is to find and return all the indices of local minima and local maxima in the given array. You need to return the indices in a 2-D list where the first(0th) row denotes the indices of local minima and the second row denotes the indices of local maxima. In case if there is no local minima or maxima return -1 as the only row element.

We say that an array element arr[i] is a local minimum if it is less than to its neighbours, and local maximum if it is greater than to its neighbours.

Note:
For corner elements, we need to consider only one neighbour for comparison.    
For Example:
For the given array :  10 5 20 30 40 35 50

picture

The red circle at index 1,5 are local minima because elements at index 1, and 5 both are smaller to its neighbours.

The green circle at index 0,4,6 are local maxima, because element at index 4 is greater than its neighbours, and element at 0, and 4 are corner elements and also greater than its one neighbour.
Problem approach

Given an array “arr” of “N” integers. Your task is to find and return all the indices of local minima and local maxima in the given array. You need to return the indices in a 2-D list where the first(0th) row denotes the indices of local minima and the second row denotes the indices of local maxima. In case if there is no local minima or maxima return -1 as the only row element.
We say that an array element arr[i] is a local minimum if it is less than to its neighbors, and local maximum if it is greater than to its neighbors.

Try solving now

2. Sort by Kth bit

Easy
15m average time
90% success
0/40
Asked in companies
UberAccoliteAjio

You are given an array/list ‘ARR’ of ‘N’ positive integers and an integer ‘K’. Your task is to group all the array elements with ‘K-th’ bit (rightmost bit is ‘1st’ bit) equal to 0 followed by all the elements with ‘K-th’ bit equal to 1.

Note 1: The relative order inside both the groups should remain as it was in the input.

Note 2: You have to return the modified array/list..

For Example :
If ‘ARR’ is {1,2,3,4} and ‘K’ = 1, then after modification, ‘ARR’ should be {2,4,1,3} because ‘K-th’ (‘K’ = 1) of {2,4} is 0 and ‘K-th’ bit of {1,3} is 1.
Problem approach

You are given an array/list ‘ARR’ of ‘N’ positive integers and an integer ‘K’. Your task is to group all the array elements with ‘K-th’ bit (rightmost bit is ‘1st’ bit) equal to 0 followed by all the elements with ‘K-th’ bit equal to 1.
Note 1: The relative order inside both the groups should remain as it was in the input.
Note 2: You have to return the modified array/list..

Try solving now

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
1 rounds | 3 problems
Interviewed by Uber
0 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by Uber
1368 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by Uber
993 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Uber
5238 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
115097 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
58238 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
35147 views
7 comments
0 upvotes