MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / even_tree

Function even_tree

graphs/even_tree.py:33–46  ·  view source on GitHub ↗

2 1 3 1 4 3 5 2 6 1 7 2 8 6 9 8 10 8 On removing edges (1,3) and (1,6), we can get the desired result 2.

()

Source from the content-addressed store, hash-verified

31
32
33def even_tree():
34 """
35 2 1
36 3 1
37 4 3
38 5 2
39 6 1
40 7 2
41 8 6
42 9 8
43 10 8
44 On removing edges (1,3) and (1,6), we can get the desired result 2.
45 """
46 dfs(1)
47
48
49if __name__ == "__main__":

Callers 1

even_tree.pyFile · 0.85

Calls 1

dfsFunction · 0.70

Tested by

no test coverage detected