Ezvor

3807. Minimum Cost to Repair Edges to Traverse a Graph

MediumBinary Search Preparing judge… LeetCode
Binary SearchBreadth-First SearchGraph Theory

Hints

Hint 1
Use binary search.
Hint 2
For a fixed value of money, check whether there exists a path from node 0 to node n - 1 that uses at most k edges.
Hint 3
Use binary search to find the smallest value of money that makes this possible.