Uber - SSE | Feb 2021 | Reject

Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2021-02-19Added By Anonymous
Source: Link

Company: Uber
Role: Senior Software Engineer
Interview Stage: Onsite
Location: unknown
Year: 2021

Original Post Content:

I had screening round in December one graph question asked.

Onsite:

Round1: Problem Solving
1- Given a list of [origin, destination] pairs (you can think of them as plane tickets), sort them into a single continuous route.
2 - Given a set of [origin, destination] nodes with no guarantees of connectedness and non-branching, find the longest continuous route.

Problem was similar to https://leetcode.com/explore/interview/card/uber/296/trees-and-graphs/1727/

Round 2 : Machine Coding
DP problem (I think it was)
Given an array of array says riders with start_time, end_time and some value - [[i, j, v]....] and also given a K these many rides you can take, start_time and end_time are inclusive. Return the max value you can get

Eg: [[1,2,3],[3,4,4],[2,3,5]], K= 2
output = 7 (You can only choose 1 and 2 third one is overlapping with 1 and 2)

2 - [[1,2,3],[3,4,4],[2,3,10]] , k = 2
output = 10

Couldn't able to write an optimized solution..

Comments