RICK ON GRAPH
CodeChefOpen on judge ↗
Today Rick and Morty travelled to dimension G-137 where they were captured by the Council of Ricks. They can only escape if they are able to solve the this problem: Given a simple(no parallel edges or self-loops) connected undirected graph with $N$ nodes and $M$ edges and an array $A$ of size $N$. Initially no value is assigned to any node. You have to use the elements of the array to assign value
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