def f1(self, start) - Perform breadth-first traversal from the vertex start (the vertex C) and the results are displayed in three lines. The first line shows only the degree of each vertex corresponding to the second line vertices. The second line shows only the vertex. The third line displays the vertices with their degrees as odd numbers in Parentheses "()". Output in this case like that:
OUTPUT
464543332332 CAEFIGJKHBDL
CAEF(5) IG(3) J(3) K(3) H B(3) D(3) L
def f2(self, start, end) - Using the Dijkstra's shortest path algorithm to find the shortest path from the vertex start (start="C") to the vertex end (end = "K"). (Note that in the weighted matrix, the value 999 is considered as infinity). Write 2 lines to the screen. The first line, display the list of vertices in the shortest path (from start to end). The seocnd line, display the verties and the shortes distance in curly brackets "{}" which is an odd number. Output in this case like that:
OUTPUT
C-D-E-F-K
C-D{1}-E-F{3}-K{5}
3
Zoom
+ 100%
Close