Problem | You got | Out of |
---|---|---|
1 | 10 | |
2 | 10 | |
3 | 10 | |
4 | 10 | |
5 | 10 | |
6 | 10 | |
7 | 10 | |
8 | 10 | |
9 | 10 | |
10 | 10 | |
TOTAL | 100 |
0
|
def mystery(g): def helper(n, s): if len(s) == g.order: return True for m in n.adjacent_nodes(): if m not in s: helper(m, s.union({m})) return False for n in g.nodes: if helper(n, {n}): return True return False