Is my idea correct? [SOLVED]

For yesterday’s contest :

greedy uber driver problem:

What I have thought is modified dijkstra finding shortest path with maximum (minimum of all weights on path).

Solution Link:

But it shows WA.

Is my approach correct? If it is, then what might be causing WA?

Any helpful counter test-cases which break my code?


Solved! simple bfs with binary search! no dijkstra stuff needed!

1 Like