Skip to content

Elevator Assignment

Published 3 October 2026

A Pinterest coding question.

Coding Round 2 — Elevator Assignment

The second coding question was Pinterest's recurring elevator-dispatch problem. The base problem asked which elevator should handle an incoming request under the supplied elevator states and request information. The interviewer then added a more involved simulation follow-up.

Follow-Up Scenario

All elevators begin idle at specified starting floors. There are N passengers, and each request includes the passenger's starting floor, desired direction, and the time the request occurs. The task was to reason through the sequence of requests and determine which elevator ultimately serves the last passenger. Full production code was not required for this extension; pseudocode and a clear simulation strategy were acceptable.