Sponsored
Use these hints if you're stuck. Try solving on your own first.
Use DFS from node <code>k</code>.
Mark all the nodes visited from node <code>k</code>, and then check if they can be visited from the other nodes.
Solve with full IDE support and test cases