Google | Onsite
Anonymous User
3725

Graph is given as adj list format, return nodes order starting from any node.
Input:
[A: [B, D]
B: [A, C]
C: [B, D]
D: [A, C]]

Output: ABCD
Assumption: Graph represents Ring topology find the optimized way to traverse.
Follow up: Check if Graph represent ring topology check for all corner cases.

Comments (10)