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.
you can do much simpler than those algos, here.
Note: what language? Because in python, I think anyone of those should pass... :o
I was able to get my passed assertions up from 40ish randoms with dijkstra to 264 random assertions with A*, but I'm still timing out solving this ridiculous number of mazes.
Were you able to pass this? because the suite is still broken!
I would first create a DFA. If this is too hard, try thinking about how you created the DFA for multiples of 3. Then shorten this DFA with regex, removing one state each time you shorten it. Do this until you only have state A. This should work. If there are bugs try running through each compression of the DFA until you find where you did something wrong.
Or: you can write a solution using recursion, find that it works on regex101.com, then come back here to submit it and realise that in python this kata uses the re module, which does not support recursion -_-
Back to the drawing board...
Pass the test but don't know the whole process because the perloaded code really makes me confused...
Pass the sample tests again but still crash when clicking the ATTEMPT
Wonder why...lol
the method is exactly the same. That's efectively a nightmare to make it by hand. So generally, "one" solves the 1 kyu verison first, then generate a regex from there... ;)
It would be great if someone tells me what should I learn first to solve this Kata...
I used to solve a similar problem which the number is 3, but the method doesn't work since the nested can be too complex.
the python version has been updated, please try again.
This comment is hidden because it contains spoiler information about the solution
seems rather like your code is inefficient. Tho there is another simpler algo you can use in this specific case.
Thanks.
Maybe all puzzled people should take a look at this dialogue and then will understand the order better: "from right to left, top to bottom".
For example, I set the order "from top to bottom, right to left" first and obviously confused for two hours...what a sad story!
Still get timeout in this Kata, this time I use A*.
Mayba I should think about my code struct deeply...
sad story
Time out when the array grows up to about 90*90, breadthfirst and greedfirst have been used.
Does it mean I have chosen the wrong algorithm or just because my code is inefficient?
The feeling is hard to describe when I always see the timeout on Codewars.com...OAQ
Loading more items...