</>OfferRetriever
DashboardDiscuss
NEW

Halloween Sale

Unlock all premium questions for over 30% off

$10.42$7.08/mo

--

:

--

:

--

:

--

Get this deal
Back to Google Questions

Highway Checkpoint Tolls

Medium

Question

Several toll checkpoints sit along a highway. Each time a car passes one, a log entry records its license plate and which checkpoint it was. A checkpoint's position is the number inside its name (letters are ignored), and driving between two checkpoints costs 10 per unit of distance between their positions. A trip from "K7" back to "K2", for instance, is charged |7 - 2| * 10 = 50. ...

Asked at:Google

More Google interview questions

All Google interview questions
OfferRetriever

Master technical interviews with real questions from top companies. Build your confidence and career.

PRODUCT
PricingDashboardDiscussOfferRetriever vs LeetCodeCompare
LEGAL

© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.