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

SDE - 2

Uber
upvote
share-icon
3 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Journey
I kept practicing DSA and CS fundamentals from the 3rd year of Engineering. Along with that, I was also learning web development and made some good projects. Uber was the first company that visited our campus. I left no stone unturned, went through previous interview experiences, polished my skills, and eventually cracked the very first interview I attended in my life.
Application story
I see one post on Linkedin that this company is hiring for SDE-2 roles. We just had to upload our resume and fill in all details in the form. First, they took the online assessment. Later, they called us for the interview rounds.
Why selected/rejected for the role?
The basic reason for my selection was my strong knowledge of core DSA fundamentals and my problem-solving ability. I was selected because I had developed skills such as DSA, problem-solving, and logical building ability. I also prepared for the HR round, as I was already familiar with all the questions asked. I was able to pick up on the hints given by the interviewer and build my answers based on the hints provided.
Preparation
Duration: 3 months
Topics: Data structures and algorithms, Design patterns, System design, Databases
Tip
Tip

Tip 1: Do some basic research about the interview process and types of rounds before appearing for a company interview. Narrow down the topics and draft a realistic plan afterward.

Tip 2: Try to solve as many problems as possible, as this is primarily what you will be doing in live interview rounds.

Application process
Where: Linkedin
Eligibility: 7
Resume Tip
Resume tip

Tip 1 : Tailor your resume as per expectations from the role you are applying for.
Tip 2 : Order your experiences and skills by relevance.
Tip 3 : Try to fit the content in a single page.

Interview rounds

01
Round
Hard
Online Coding Test
Duration90 mins
Interview date3 Nov 2022
Coding problem1

Timing: Evening
Environment: Online round taken at home

1. Smallest Subarray with K Distinct Elements

Easy
20m average time
80% success
0/40
Asked in companies
UberPhonePeGoldman Sachs

Given an array 'A' consisting of 'N' integers, find the smallest subarray of 'A' containing exactly 'K' distinct integers.

Note :
If more than one such contiguous subarrays exist, consider the subarray having the smallest leftmost index.

For example - if A is [1, 2, 2, 3, 1, 3 ] and k = 2 then the subarrays: [1,2], [2,3], [3,1], [1,3] are the smallest subarrays containing 2 distinct elements. In this case, we will consider the starting and ending index of subarray [1,2] i.e. 0 and 1.
Problem approach

At first sight, this can be solved easily by using two loops to iterate over contiguous subarrays in O(n^2) and counting a number of arrays and breaking the outer loop if the number of odds exceed 'k'.

The optimized solution is to take two pointer approach where the right pointer is incremented till num of odds does not exceed 'k'. If the limit is reached, increment the left pointer and add a number of arrays (right - left+1)*(right-left)/2 to the result. This solves the problem in O(N)

Try solving now
02
Round
Medium
Video Call
Duration120 mins
Interview date3 Nov 2022
Coding problem2

Machine coding round.

1. Design Questions

Design and code a publisher-subscriber-based messaging queue supporting the following features:

  1. New topic creation.
  2. Multiple consumer subscriptions to a topic.
  3. Multiple producer threads writing to a topic.
  4. Topic message rewind (maintaining commit logs).
Problem approach

1. I drafted LLD by defining classes - methods and members.
2. I discussed the approach and working of LLD to fit the given features
3. I live coded the classes and logic using core Java on my machine.

2. Design Questions

Design Stock Exchange System:
I was required to describe a typical stock exchange system design. He asked me to begin by defining API contracts. The problem was open-ended, so I started by clarifying the scope and performing basic scale calculations. Only then did I begin defining the API contract.
We had a discussion on the data structures to be used to support the core logic and then moved on to defining the database schema. Finally, we had a high-level design discussion on scaling the system and database partition rebalance strategies.

Problem approach

Tip 1: Revise general distributed system concepts thoroughly. 

Tip 2: Practice as many design problems as possible within time constraints. Try to discuss approaches with friends. 

Tip 3: Clarify as many doubts and assumptions as possible with the interviewer before jumping to the solution.

03
Round
Easy
HR Round
Duration40 mins
Interview date3 Nov 2022
Coding problem1

Hiring Manager round.

1. HR Questions

1. Brief description of past work.
2. Recent challenging bug/issue solved.
3. Design description of one of the projects.
4. SDLC, tooling, agile related discussions.

Problem approach

Tip 1 : Revisit and recollect your past experiences in detail with a focus on learnings, challenges, conflicts etc.
Tip 2 : Prepare general behavioral and situational questions for the role.

Here's your problem of the day

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

Skill covered: Programming

Which SQL keyword removes duplicate records from a result set?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 2
4 rounds | 5 problems
Interviewed by Uber
0 views
0 comments
0 upvotes
company logo
SDE - 2
3 rounds | 5 problems
Interviewed by Uber
4396 views
0 comments
0 upvotes
company logo
SDE - 2
2 rounds | 2 problems
Interviewed by Uber
1546 views
0 comments
0 upvotes
company logo
SDE - 2
2 rounds | 2 problems
Interviewed by Uber
1689 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 2
5 rounds | 12 problems
Interviewed by Walmart
25139 views
8 comments
0 upvotes
company logo
SDE - 2
3 rounds | 5 problems
Interviewed by Amazon
5505 views
0 comments
0 upvotes
company logo
SDE - 2
6 rounds | 8 problems
Interviewed by Amazon
3959 views
0 comments
0 upvotes