A travel agent have tickets for multiple locations. He wants to build a solution where he can show all the possible routes for which he has available tickets from any given location.
I have created linked tree where each node represents a location and edge is the ticket availability between them. tickets = [["A", "B"]] is any list of array which contain tickets between location A,B.
Python 2.7 Run the code using python <filename.py>