[Community Puzzle] Dominoes Path

Send your feedback or ask for help here!

3 posts were merged into an existing topic: Community Puzzle: Dominoes Path

While I was doing this puzzle, I had a solution that was passing all the test cases in the IDE except the one called: “Long path scrambled”.
Just by curiosity I submitted it anyway, thinking “it might just pass”. And it did, got 100% on the validation test cases.

Maybe a test case similar to this “Long path scrambled” should be added to the validation tests?

1 Like

I had the exact same experience. Could not pass Test 5: Long Path Scrambled, but received 100% on submission. (I do that b/c I think that makes it appear as In Progress.) Given the success rate of 74%, I am curious how many people that gave up because they couldn’t pass Test 5 would actually pass submission if they knew this. But before changing the validation test, maybe a re-examine of Test 5 first?

Am I the only one who stucked at “Long path scrambled” test ? It seems weird to me, because it should fail at the very top.

I think some people solving the tests and validators would fail this simple test :
5
0 1
1 2
3 4
4 5
5 3
(which should be false)
Too late, but a validator like this should have been added.

By the way, if the dominoes go in a perfect loop ( 0 1 -1 2 - 2 3 - 3 0), what should be the output, true or false ?

Last test case failed, here is the display of edges and nodes

{0: [1], 1: [0, 2, 6], 2: [1, 3, 4], 3: [2, 4], 4: [3, 5, 2], 5: [4, 6], 6: [5, 1]}

Clearly there is a single path that covers all dominoes (0 → 1 → 2 → 3 → 4 → 5 → 6), so why the expected output is false ? (Perhaps a stupid question …

The expected output is false because the task requires a single path that uses every domino exactly once, not a path with branches. Adjacent dominoes in the path must touch with matching numbers. While it’s possible to build a single path using the first seven dominoes in the input, it’s not possible to insert the eighth one without branching off.