| 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 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| A | ||||||||||||||||
| A,B | ||||||||||||||||
| A,B,C | ||||||||||||||||
| A,B,C,D |
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