Sponsored
Use these hints if you're stuck. Try solving on your own first.
What graph algorithm allows us to find whether a path exists?
Can we use binary search to help us solve the problem?
Solve with full IDE support and test cases