Sponsored
Use these hints if you're stuck. Try solving on your own first.
Find the distance from s to all nodes.
You can use Dijkstra to find them.
Find the minimum distance between marked nodes.
Solve with full IDE support and test cases