← All problemsSign in

Graph Life

[Jeet](https://codechef.com/users/amitrajit_bose) is a fan of Graph Theory and loves solving problems dealing with interesting cases and real-world practical applications of graphs. [Yusuf](https://codechef.com/users/yusufi123), his friend, as you probably know by now, is good at academics as well. Jeet wanted to ask a question to Yusuf, to test his knowledge. He says that, suppose you are provid

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start