Search
⌘K

Leetcode 1396. Design Underground System

Design a system that records passenger check-ins and check-outs and returns the average direct travel time between two stations. The core challenge is maintaining active check-ins per passenger id and aggregated travel-time statistics (sum and count) per station-pair to answer getAverageTime queries efficiently.

Asked at:

Axon

Axon

Ramp

Ramp


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Mid March, 2026

Axon

Axon

Senior

Early March, 2026

Axon

Axon

Mid-level

Late October, 2025

Axon

Axon

Senior

Police officers report their timed GPS location to a dispatch center. Implement a function for the dispatch center to find an officer's location closest to a given time.

Your account is free and you can post anonymously if you choose.