Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Seems arbitrary. Self-comparison plays a role in symmetry for odd-length arrays. You still have even-length left for your symmetry driving needs
But why arbitrarily let length 1 arrays count but not larger odd length arrays? Wouldnt it make way more sense to treat them the same?
But
arr[2] == arr[5-1-2] == 3Why does
[1,2,3,4,5]have no mirror index but[42]has one?getting
in the random tests of the sample tests
This comment is hidden because it contains spoiler information about the solution
In the end of the secription it says that your program is not allowed to access its own source code.
So such things are not accessible.
Looks good, approved :)
Great to hear, thanks :)
And Ive run the new test cases a few times and the time variance seems quite high.
Maybe we should add some smaller grids than 8 instead, to make the time it takes more uniform.
Looks nice already, although I dont know much about js. A few things:
Approved :)
But one sentence about how "garden of edens" exist should clear that up, although there hasnt been any garden of eden in 8x8 or smaller found yet so probably evry tests case will have a solution anyway. Also to completly avoid such patterns you would have to run a reference solution on each test case, which would lower the amount of tests. Or generate the test cases by running a pattern forward, but then you only get quite sparse patterns.
Yes the assertion feedback is something I already wanted to enhance some time ago :D
Ok I will change it to infinite boards then. There are also some interesting cases (found by doooom below) where a (m+2)x(n+2) predecessor doesnt exist, but a (m+4)x(n+4) does exist. Those then could also be tested maybe (Although the chance is very slim that this happens during random tests).
But I dont have too much time at the moment so could take a bit..
It seemed to me that the format of the answer is clearly described (that it should be bigger to make solutions more often possible and that the extra cells should die). But maybe I can clarify it more, or change the format to same sizes. Also my solution at least doesnt pad the input board, havent looked at all the others.
I dont know why I chose finite worlds back then. An infinite world seems to me like the more natural setting for the task now. Then you wouldnt even have to define a certain fixed dimension for the answer, as long as it evolves into the goal somewhere and the only living cells belong to the goal pattern. Could invalidate a lot solutions, not sure, but I wouldnt be against changing the kata to infinte boards.
Its not? There just arent big enough test cases to see a difference. Try
triangular 100000000 `shouldBe` 5000000050000000for example.Loading more items...