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.
IMHO the kata definitely deserves a dislike. firstly, it is meaningless, I didn’t learn anything new and the solution requires some primitive practical skills, and secondly, I had to waste time passing tests with newline character.👎
It took me 30 minutes just to understand this kata :(
Entry denied: missing required work pass.
Passport check case for Ban nations and expiry date
Above cases are not guaranteed in JS at least (should have fixed tests for that)
I completed this Kata and I must say, it really ilustrates how real life projects are done. Unfortunately, that means that it is tedious and you encounter a lot of errors that you don't know where they come from
I wrote a solution which works on IDE, but somehow on random test it have mistake, and when i try that exact problem on IDE, it works perfectly.
Implemented a deterministic solution with complexity O(n^3) in Python. Solves 70-by-70 puzzles in <10s on my laptop.
It's worth doing these kata just to see others' one-liners.
A very good and funny kata! Thanks to author!
No time for do it on python, +12000ms :(
There is only one path and it maintains a width of = ok;
Aliens move one square per turn = ok;
Turrets only fire toward enemies in range = ok;
Turret target priority is toward the enemy within shooting range that is furthest along on the path = ok;
Turret shooting timing = ok;
5 EXAMPLE TESTS[2]
All rules are followed.
Alien 11 breaks through with 6HP and alien 13 dies in cell 8. I looked at every move and every turret attack they are correct. But for some reason the test says it should return 3, but my code will return 6.
Fixed by OP
Guys, tell me which blows starts the first move. Turn by iteration list or should the list be sorted? If you need to sort the list, then by what criteria?
Can't make heads or tails of what you're saying. What's a cycle?
Note that you sometimes print out the documents, but not always. Maybe you're looking at the wrong document.
In my solution I'm able to re-order the nationality-check and expiration-check and it's passing either way.
regarding what's logical, it doesn't matter what you think makes sense, only what the spec is. in this case, either order is fine.
you have to check the passport first, since that states the nationality, which in turn is something that the vaccination check relies on.
the other documents can be checked to be missing later. Detainment still takes priority though. I ran the tests 1000 times (to ensure it's not a fluke) locally with all document-missing checks except passport happening after vaccination checks. and that passed.
This kata cannot be performed in one cycle. My code will take the first document and check if everything is ok in the first document. If there is a problem with the document's expiration date, it will return a message about this and terminate the program. But checking your nationality is your priority, because of this my code cannot pass this cata. Checking the expiration date of the document will take 1 cycle, and checking the nationality identity will take 2 cycles. Isn't it logical to prioritize checking expiration dates over checking nationality?
Loading more items...