Find Path To ZERO (Keteki)
CodeChefOpen on judge ↗
Given a graph represented by a 2D array where ith row and jth column is 1 if there is a path from node i to node j. Print, "YES" if there is a path from node 0 to node 0, that is a cycle from node 0 to node 0 else print "NO". (Quotes for clarity) Input will contain number of nodes on a newline, followed by the the 2D graph where each value would be separated by a space (see samples). ###Constra
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