Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Uber interview experience Real time questions & tips from candidates to crack your interview

SDE - 2

Uber
upvote
share-icon
5 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 1 month
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 while appearing for a company interview. Narrow down the topics and draft a realistic plan afterwards.
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: None as such. Only eligible criteria for SDE-2 role is that one should have prior experience working as SDE
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
Easy
Online Coding Interview
Duration60 minutes
Interview date1 May 2019
Coding problem1

Timing: evening
Environment: Online round took at home

1. Smallest Subarray with K Distinct Elements

Easy
20m average time
80% success
0/40
Asked in companies
UberGoldman SachsHexaware Technologies

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 number of arrays and breaking the outer loop if number of odds exceed 'k'.

Optimised solution is to take two pointer approach where right pointer is incremented till num of odds not exceed 'k'. If limit is reached, increment left pointer and add 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
Face to Face
Duration90 minutes
Interview date5 May 2019
Coding problem1

Machine coding round

1. Design and code publisher subscriber based messaging queue supporting following features:

Design and code publisher subscriber based messaging queue supporting 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 (maintain 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.

03
Round
Medium
Face to Face
Duration60 minutes
Interview date5 May 2019
Coding problem1

1. Rat In a Maze All Paths

Moderate
40m average time
60% success
0/80
Asked in companies
InfosysOptumRazorpay

You are given a 'N' * 'N' maze with a rat placed at 'MAZE[0][0]'. Find and print all paths that rat can follow to reach its destination i.e. 'MAZE['N' - 1]['N' - 1]'. Rat can move in any direc­tion ( left, right, up and down).

Value of every cell in the 'MAZE' can either be 0 or 1. Cells with value 0 are blocked means the rat can­not enter into those cells and those with value 1 are open.

Problem approach

Practise many grid problems 

Try solving now
04
Round
Medium
Face to Face
Duration60-90 minutes
Interview date5 May 2019
Coding problem1

1. Design stock exchange system

I was required to describe a typical stock exchange system design.
He asked me to begin with defining API contracts. Problem was open ended. Started with clarifying the scope and did basic scale calculations. Only then begin with defining API contract.
Had a discussion on data structures to be used to support core logic. Then jumped to defining database schema.
Finally had some 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 with time constraints. Try to discuss approaches with friends.
Tip 3 : Clarify as many doubts and assumptions as possible wit h the interviewer before jumping to the solution.

05
Round
Medium
HR Round
Duration60 minutes
Interview date5 May 2019
Coding problem1

Hiring Manager round

1. General 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 behavioural and situational questions for the role.

Do you know this?

TikTok uses _________ to recursively display trending videos ensuring your feed is filled with new content.

Start a Discussion
Similar interview experiences
company logo
SDE - 2
4 rounds | 5 problems
Interviewed by Uber
0 views
0 comments
0 upvotes
company logo
SDE - 2
2 rounds | 2 problems
Interviewed by Uber
1310 views
0 comments
0 upvotes
company logo
SDE - 2
3 rounds | 4 problems
Interviewed by Uber
1235 views
0 comments
0 upvotes
company logo
SDE - 2
2 rounds | 2 problems
Interviewed by Uber
1379 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 2
5 rounds | 12 problems
Interviewed by Walmart
23256 views
8 comments
0 upvotes
company logo
SDE - 2
3 rounds | 5 problems
Interviewed by Amazon
5017 views
0 comments
0 upvotes
company logo
SDE - 2
6 rounds | 8 problems
Interviewed by Amazon
3535 views
0 comments
0 upvotes