# [Community Puzzle] \ Domino Puzzle /

How is it possible that more than four dominoes fall in the βsimpleβ test case?
| | | /
\ | | \
- | | -
- | . -
The three dominoes on top left fall, then the one on the top right and it stops.

The one on the top right falls on the one below.

1 Like

Ha, I thought that such a move was impossible.

I pass everything but the last validator after submit. my dominoes fall in order, Iβm not so certain that order doesnβt matter. What trickery is involved in the last validator? Iβve accounted for the first space being empty, so that shouldnβt be it. I guess it could be timing out, but i doubt it - itβs not that complex. Iβm basically just doing a flood fill, with a stack . No fancy classes. I even use an array instead of a bunch of if statements eg. \$dirs=[βLEFTβ =>[β|β=>true ,β-β=>false,β\β=>true ,β/β=>true ],
βRIGHTβ=>[β|β=>true ,β-β=>false,β\β=>true ,β/β=>true ],
βTOPβ =>[β|β=>false,β-β=>true ,β\β=>true ,β/β=>true ],
βBOTβ =>[β|β=>false,β-β=>true ,β\β=>true ,β/β=>true ],
βTLβ =>[β|β=>true ,β-β=>true ,β\β=>false,β/β=>true ],
βTRβ =>[β|β=>true ,β-β=>true ,β\β=>true ,β/β=>false],
βBLβ =>[β|β=>true ,β-β=>true ,β\β=>true ,β/β=>false],
βBRβ =>[β|β=>true ,β-β=>true ,β\β=>false,β/β=>true ]];
Yes, Iβm using php. Help?

Hi there,
I am not sure that order matters - I tried it using DFS instead of BFS (my original solution) and there is no difference.
As for the last validator, I donβt think there is anything particular about it.
I hope this helps.

Having the same problem as Patrick above. Pass all tests and validators except the last one. Iβve tested a bunch of edge cases in the IDE, coded an empty starting space, tried hard coding 0, NN, NN-1 as the answer, none of this can get me past the last validator. Any hint would be much appreciated.

1 Like

Hereβs the validator:
Input

4

``````- . . .
\ | | /
- - . -
/ | | \
``````

Output

1

2 Likes

Sorry, I missed to mention it on the forum.
@LastRick struggled with validator 5. He found the bug and provided an additional testcase (causing an infinite loop for the buggy solution) which I added to the end.

2 Likes

perfect, thanks!

1 Like

Hello, in my case all the tests work, and all the validators too,exept the first oneβ¦And i have no idea why; Can someone help me?

Try a Custom test case:

``````4
| / | /
. . \ -
. | . \
. | | \
``````

Expected output:

2

To run Custom test cases you need to enable Expert mode is settings.

1 Like

Youβre right, I also think of thatβ¦