|
| 1 | +Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:05:16) [MSC v.1915 32 bit (Intel)] on win32 |
| 2 | +Type "help", "copyright", "credits" or "license()" for more information. |
| 3 | +>>> [None]*5 |
| 4 | +[None, None, None, None, None] |
| 5 | +>>> |
| 6 | +======== RESTART: G:/ProgramsPython/Algorithms/AdjacencyListGraph.py ======== |
| 7 | +self.graph <__main__.AdjNode object at 0x04177C10> 1 None |
| 8 | +self.graph <__main__.AdjNode object at 0x04177C30> 4 <__main__.AdjNode object at 0x04177C10> |
| 9 | +self.graph <__main__.AdjNode object at 0x04177DB0> 3 None |
| 10 | +self.graph <__main__.AdjNode object at 0x04177DF0> 4 <__main__.AdjNode object at 0x04177DB0> |
| 11 | +self.graph <__main__.AdjNode object at 0x04177E30> 2 <__main__.AdjNode object at 0x04177DF0> |
| 12 | +self.graph <__main__.AdjNode object at 0x04177C90> 3 None |
| 13 | +self.graph <__main__.AdjNode object at 0x04186190> 4 None |
| 14 | +>>> graph.graph[0] |
| 15 | +<__main__.AdjNode object at 0x04177C30> |
| 16 | +>>> graph.graph[0].vertex |
| 17 | +4 |
| 18 | +>>> graph.graph[0].next.vertex |
| 19 | +1 |
| 20 | +>>> graph.graph[1].vertex |
| 21 | +2 |
| 22 | +>>> graph.graph[1].next.vertex |
| 23 | +4 |
| 24 | +>>> graph.graph[1].next.next.vertex |
| 25 | +3 |
| 26 | +>>> graph.graph[0].next.next |
| 27 | +>>> |
| 28 | +======== RESTART: G:/ProgramsPython/Algorithms/AdjacencyListGraph.py ======== |
| 29 | +self.graph <__main__.AdjNode object at 0x03747C70> 1 None |
| 30 | +self.graph <__main__.AdjNode object at 0x03747C30> 4 <__main__.AdjNode object at 0x03747C70> |
| 31 | +self.graph <__main__.AdjNode object at 0x03747DF0> 3 None |
| 32 | +self.graph <__main__.AdjNode object at 0x03747E30> 4 <__main__.AdjNode object at 0x03747DF0> |
| 33 | +self.graph <__main__.AdjNode object at 0x03747E70> 2 <__main__.AdjNode object at 0x03747E30> |
| 34 | +self.graph <__main__.AdjNode object at 0x03747C50> 3 None |
| 35 | +self.graph <__main__.AdjNode object at 0x0375A1D0> 4 None |
| 36 | +>>> graph.print_graph() |
| 37 | +Head->->4->1 |
| 38 | +Head->->2->4->3 |
| 39 | +Head->->3 |
| 40 | +Head->->4 |
| 41 | +Head-> |
| 42 | +>>> |
| 43 | +======== RESTART: G:/ProgramsPython/Algorithms/AdjacencyListGraph.py ======== |
| 44 | +self.graph <__main__.AdjNode object at 0x03BE7BD0> 1 None |
| 45 | +self.graph <__main__.AdjNode object at 0x03BE7DB0> 4 <__main__.AdjNode object at 0x03BE7BD0> |
| 46 | +self.graph <__main__.AdjNode object at 0x03BE7E30> 3 <__main__.AdjNode object at 0x03BE7BF0> |
| 47 | +self.graph <__main__.AdjNode object at 0x03BF61B0> 4 <__main__.AdjNode object at 0x03BE7E30> |
| 48 | +self.graph <__main__.AdjNode object at 0x03BF6250> 2 <__main__.AdjNode object at 0x03BF61B0> |
| 49 | +self.graph <__main__.AdjNode object at 0x03BF6290> 3 <__main__.AdjNode object at 0x03BF6190> |
| 50 | +self.graph <__main__.AdjNode object at 0x03BF62D0> 4 <__main__.AdjNode object at 0x03BF61D0> |
| 51 | +>>> graph.print_graph() |
| 52 | +Head->->4->1 |
| 53 | +Head->->2->4->3->0 |
| 54 | +Head->->3->1 |
| 55 | +Head->->4->2->1 |
| 56 | +Head->->3->1->0 |
| 57 | +>>> |
0 commit comments