SDE-2 Frontend Interview Uber

Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2025-07-17Added By Anonymous
Source: Link

Company: Uber
Role: software engineer ii
Interview Stage: Onsite
Location: unknown
Year: unknown

Original Post Content:

Uber's Interview:

Coding 1:

Question 1:
#Uber's trip history system has encountered a malfunctioning a passenger's journey to be fragmented into multiple unordered segments. Each segment carries a portion of the trip sequence, but the correct chronological order of these segments is unknown.
# Lily, a data engineer at Uber, has been assigned the task of restoring the complete trip history. She must analyze the given segments, identify overlapping details, and piece them together in the correct order to reconstruct the original journey.

Solve it in JS.
#Your task is to design an efficient algorithm to assemble the sequence from the unordered segments.

It's n*m array

Question 2:

"Consider you are in an IPL auction for selection of players and there are few (even number of players) left over players (displayed on the screen in a row) who needs to be picked between 2 teams. Each player has a respective score number assigned which suggests how good that player is. Each team selector gets alternating turns. In each turn, a selector has to select either 1st or last player from the screen.
Determine the maximum possible score you can win if we move first.
P.S Opponent selector is as clever as you" "Sample 1
Input Surya kumar- 5, Ashwini 3, Pandiya-7, Virat 10:: (5, 3, 7,10)
Output: 5+10 = 15

Sample 2
Input Surya kumar- 8, Ashwini - 15, Pandiya-3, Virat- 7 :: (8, 15, 3, 7}

Coding Round 2:

Create a queue that allows concurrent processing of async tasks up until a limit. Tasks can be added to it after creation at any time. The queue has the following signature:
/*
type Task any;
type Queue = (ProcessorFn, OnCompleteFn, concurrency: number) => QueueObject
I
type QueueObject = {
drain: (error?: Error) => void
push: (Task or Array<Task>, CallbackFn) => void
error: (error?: Error, Task) => void
unshift: (Task or Array<Task>, CallbackFn) => void
}
type ProcessorFn = (Task, CallbackFn) => void
type (data: any, error: Error, Task) => void
type CallbackFn = (error?: Error) => void

LLD:

Render C shape squares (25px) a row. A square would have a border black and bg color white.
Keep space of 10px between squares.
Clicking on a square will change its color to green.
An unwinding process would start once all 3 squares are green. It will turn them back to white in the reverse order of click.
Unwinding should decolorize boxes one by one with a delay of 1 second between them.

HLD:

Design Google Calendar

HM:
General Discussions on previous projects and normal HM questions.

Verdict: Rejected

Comments