Hunger All Around
CodeChefOpen on judge ↗
Himanshu reaches NITW after winter breaks. He finds the Swiggy-Zomato issue ain't over yet. The unstoppable hunger and frustration of path problem for delivery guys, made him make a problem on the connection of paths a.k.a. Graphs! Here is the thing. You are given a tree of N vertices and N-1 edges. 1 is the root vertex of the tree. The vertices in the graph, depict the different hostels of NITW.
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.
Sign in to chat with the tutor and save your progress.
Sign in to start