Sponsored
Use these hints if you're stuck. Try solving on your own first.
Do you recognize this as a graph problem?
Solve with full IDE support and test cases