Find the maximum score and optimal path through a ski tournament graph.
Unlock detailed company stats for this questionUpgrade
You ski from the top of the mountain to one of the finish checkpoints. Total score = points from all checkpoints visited minus time of travel. Input: a list of [start_cp, end_cp, time_to_travel] and a list of [cp, point]. Find the maximum score and print the optimal path. Example: START -> A(24)/B(3)/C(10) -> D(7)/E(24) -> F(3) -> END_1(4)/END_2(7), with edges START-A 5, START-B 6, START-C 10, A-D 4, B-D 5, C-D 6, C-E 5, D-F 3, E-F 1, F-END_1 5, F-END_2 10. Discuss DFS, BFS and Dijkstra with time and space complexity for each; DFS optimised with DP was the agreed solution.
Format · Airbnb coding round, strict 45-minute window with a dry run at the end.
Community answers
No answers contributed by the community yet.


