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.
python new test frameworks
This comment is hidden because it contains spoiler information about the solution
"The aliens that survive are the alien at wave[7] with an ending health of 2
and the alien at wave[8] with an ending health of 8." - typo in Instructions (Test Example section). Wave[8]'s health can't be 8 since it's 0 from the start. And the same is applicable to "example_solutions = [[10,[7,2],[8,8]]..." in Sample Tests section. As for wave[7] then it's also not valid. According to my solution it has to be wave[9] and wave[10] respectively. On the other hand it still accepted because their sum is 10.
Yes, errors for crashing still happen after complications in code.
No matter how hard I try attempting, the thing would just crash and say session expired.
Haskell translation
What regex can consistently get countries from string like these:
I solved it without regex (check solution because spoiler)
This comment is hidden because it contains spoiler information about the solution
python new test frameworks
Perhaps my description of the kata will make more sense:
Description
Amidakuji is a lottery method designed to create random pairs between two sets of the same size.In this kata the elements of the first set are whole numbers from 0 to 6. Your task is to write an
amidakuji
function that returns second set comprised of converse numbers.Input
Your function will receive an array of equal-length strings consisting of 0 and 1 characters; this represents the "ladder" structure. The
1
represent the rungs of the ladder and the0
represent empty space.Take a look at the diagram below:
Row
0
of the ladder is'001001'
string, which means there will be two horizontal bridges at this row; one between the vertical lines 2 and 3 and another between vertical lines 5 and 6. When proceed to move down vertical lines, a transition is made to the adjacent vertical line over the nearest bridge.Output
The diagram above is a visual representation of
ladder
argument of the function.At the top of the diagram the 2 has a third position, in the aftermath of the ladder it got a second position. The yellow highlighted path shows the path taken by the 2 value. Every time it encounters a bridge, it moves to the opposite vertical line.
Your function should return an array of numbers, with each number in its final position.
When I was trying to submit a python solution, it passed all the fixed tests, but when it got to random I got an error
My solution seems to work with the random test cases, but somehow it still gives the error
python new test framework
Unless I've gone blind, there's almost nothing explained about the Allow/Deny a nation. Do I have to check in a whitelist manner (nation has to be in allow list) or blacklist manner (nation must not be in deny list) or do I combine them to one list in either manner, where one method removes from list, other adds to it? Additionally, do the countries aggregate or get reset between days?
i'm coding in the golang version and i'm sure there's something wrong with one of the tests
given that the lower bound is 100000 and the upper bound is 12345678900000000, but somehow the answer is only 718650, which from what I calculated is way less then just the total for a 16 upside-down number sum. So, now im also wondering if actual tests are correct or not.
That was a really nice kata
One small suggestion; the description states:
It left me wondering whether completing two boxes at once provided with 2 extra turns or only 1. It turns out it is the latter. Perhaps this could be mentionned ?
Loading more items...