Summer Sale
Limited Time Deal: Unlock all premium questions for over 30% off
14
:
03
:
45
:
00
Best Ski Route
Question
You are skiing down from the top of a mountain and want to maximize your score when you reach the finish.
There are multiple routes you can take, and each route has checkpoints with different point values associated with them. Your final score will be determined by the sum of all the checkpoints you hit minus the total travel time.
Find the optimal route to maximize your final score.
Part 1 — Single Starting Point
Given travel_time (edges between checkpoints with travel times) and points (point values at each checkpoint), find the path from START to any FINISH that maximizes: sum(points) - sum(travel_time).
Example 1
Input:
START(0)
/ \
6 8
/ \
A[18] B[26]
| \ / |
...
OfferRetriever
Master technical interviews with real questions from top companies. Build your confidence and career.
LEGAL
© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.