Light Mode
Dark Mode
How to solve Disposable-Teleporters

declarations: My skills with graphs and trees is not good at all

I could generate the graph from input. I used following data structure to do so. graph = {'1':['2'], '2':['3'], '3':['4'], '4':['5'], '5':['6'], '6':['7'], '7':['8'], '8':['1']}

I tried a lot of ways to write an algorithm to visit all nodes but not successful.

Any guide?

Created: Nov. 16, 2013, 11:11 a.m.
Updated: Oct. 14, 2016, 6:48 p.m.
0
14
User avatar
SandeepShelke