The interview process consisted of three rounds:
This was an elimination round designed to assess core technical and problem-solving skills.
Earliest Timestamp When All Users Become Connected
You are given logs representing shared ride interactions between users.
<timestamp> <UserA> shared ride with <UserB>Each log indicates that UserA becomes connected with UserB at the given timestamp.
The logs are sorted by timestamp.
Task
Determine the earliest timestamp at which all users in the system become connected.
A second type of log was introduced:
<timestamp> <UserA> cancel ride with <UserB>This operation removes the connection between the two users.
Updated task
Determine the earliest timestamp at which all users are connected, considering that connections can also be removed.
This round focused on algorithmic problem solving and optimized implementation.
Microservice Restart Cycles
There are N microservices. Each microservice may depend on other microservices.
A service can only start if all its dependencies are already started.
Input format:
N
For each service i:
K dep1 dep2 dep3 ...Where:
K = number of dependencies of service idepX = indices of services that must start before service iThe system attempts to start services in cycles:
Task
Return the minimum number of cycles required to start all services, or report impossible if it cannot be done.
This round evaluated class design, modular code structure, and API design.
File System API Implementation
Design an in-memory file system that mimics basic Linux directory operations.
Required APIs:
mkdir(dirname: string)
pwd()
cd(path: string)Functional requirements
mkdir(dirname)
Creates a new directory inside the current working directory.
pwd()
Returns the absolute path of the current working directory.
cd(path)
Changes the current working directory.
Path rules
/, it represents an absolute path from rootThe path may contain a wildcard *.
* can match:
.)..)The APIs should behave similarly to Linux directory navigation commands.