Round one

Final checkpoint: mixed interview rounds

Round one

Two problems, 45 minutes. Both look like a scan until you read the second sentence.

Aim for around 20 minutes on the first and 25 on the second. If the first takes 35, stop it and move on. Getting partway through both is a better use of the round than finishing one.

Circular Max Subarray

Find the largest sum of a non-empty contiguous stretch, where the sequence is allowed to wrap from the end back to the start. Handle the wrapping case by describing what the unselected part looks like, then check what happens when every value is negative.

Loading the workspace…

Connection Pool Peak

Requests arrive in start order and each holds a connection for an interval. Accept one only if the pool has room, and report the peak occupancy along with how many were turned away. A rejected request never occupies anything, so each decision changes the state the later requests see.

Loading the workspace…
← Previous