|
|
[[[1, 2, 1], [2, 1, 2]], [[1, 3], [3, 1]], [[1, 4], [4, 1]], [[1, 5], [5, 1]], [[2, 3, 2], [3, 2, 3]], [[2, 4], [4, 2]], [[2, 5], [5, 2]], [[3, 4, 3], [4, 3, 4]], [[3, 5], [5, 3]], [[4, 5, 4], [5, 4, 5]]] [[[1, 2, 1], [2, 1, 2]], [[1, 3], [3, 1]], [[1, 4], [4, 1]], [[1, 5], [5, 1]], [[2, 3, 2], [3, 2, 3]], [[2, 4], [4, 2]], [[2, 5], [5, 2]], [[3, 4, 3], [4, 3, 4]], [[3, 5], [5, 3]], [[4, 5, 4], [5, 4, 5]]] |
[[1, 3], [3, 1], [1, 4], [4, 1], [1, 5], [5, 1], [2, 4], [4, 2], [2, 5], [5, 2], [3, 5], [5, 3]] [[1, 3], [3, 1], [1, 4], [4, 1], [1, 5], [5, 1], [2, 4], [4, 2], [2, 5], [5, 2], [3, 5], [5, 3]] |
For next time:
[5, 3, 1, 4, 5] [5, 3, 1, 4, 5] |
|
[1 3 2 2 2 2] [3 1 3 2 2 2] [2 3 1 3 2 2] [2 2 3 1 3 2] [2 2 2 3 1 4] [2 2 2 2 4 1] [1 3 2 2 2 2] [3 1 3 2 2 2] [2 3 1 3 2 2] [2 2 3 1 3 2] [2 2 2 3 1 4] [2 2 2 2 4 1] |
True True |
(False, False, True, True) (False, False, True, True) |
From Saurabh:
Below is my depth-first version of is_FC along with its tests. It uses function recursion to take advantage of the function stack to implement a depth-first search.
If you see this message and no errors, then the tests passed! Nice! If you see this message and no errors, then the tests passed! Nice! |
False False |
(False, False) (False, False) |
|