Problem 1396 · Medium

Design Underground System

Pair each check-in with its check-out in a hash map, then keep a running total and count per route for constant-time averages.

Open the interactive visualisation