Sharing my recent interview experience for the Uber Freight SWE 3 position.
The problem was based on a car and a group of riders.
There are N riders, and for each rider we are given two values, L[i] and H[i].
If k riders are selected, then every selected rider should satisfy:
L[i] <= k - 1 <= H[i]
Here, k - 1 represents the number of other riders traveling with that particular rider.
The objective is to maximize the number of riders who can travel together while satisfying the condition for every selected rider.
Example:
N = 5
L = [0, 1, 1, 2, 2]
H = [1, 2, 2, 4, 4]
Answer = 3The expected time complexity was O(N).
The question was to design a basic file system supporting operations such as:
mkdirlsThe interviewer was primarily interested in the design rather than the implementation.
We discussed the entities/classes required, their relationships, and how the operations would work.
We were expected to:
mkdir would create a directoryls would retrieve the contentsNo working code was required.
The final round was a distributed URL shortener design.
The discussion focused on designing the system to work reliably at large scale.
Some of the areas discussed were:
Overall, the interview process covered DSA, LLD, and HLD, with each round testing a different aspect of problem-solving and system design.