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.
nice! :D looks like askii art
I couldn't wrap my head around the question before, now I cannot wrap my head around the solution. How did you come up with such a creative solution.
Hi, Anton!
Are you sure there is definitely a case with empty input?
Well, I guess there's none of them - all the inputs do contain certain values.
A possible cause to your illustration may be input mutating (i.e. you don't make a copy of an input array, but change that in place).
Somebody help me. I dont understant what I need to return for empty input.
Where I can find this information? If your kata can accept empty input, you should describe what function need to return. Hate this stupid Assertion Error.
AssertionError: combinationLock([[],[],[],[],[],[],[],[],[],[],[]], [135,90,315,225,0,0,315])
Looks like you receive money for code strings, but not time wasted))
nice one
Kotlin translation ready for review and approval.
.
This is a class method. You need to create an instance of the class, and then apply the method to the instance. See how the tests do it:
First, create an instance
plugboard
of the classPlugboard
, then apply the method to itnameOfInstance.process(...
(you could call the instance with another name).Why does it say plugboard.process is not a function when I try to run it
( JS, possibly others )
Input validation sucks. But if you're going to do it, specify it correctly. The description promises
undefined
is not a string. Specifyundefined
is a valid input for the constructor. (""
is a valid string. Why would you passundefined
?!? ) Or, preferably, only pass valid strings ( the Haskell version actually enforces this better behaviour ).undefined
is not a single character. Specifyundefined
is a valid input for the method, and specify what output is expected. Or, preferably, only pass single characters ( the Haskell version actually enforces this better behaviour ).Then there's
Not all possible illegitimate pairings are tested, so effectively you are asking us to read your mind. Specify, exhaustively, what is legitimate. Characters other than uppercase letters are probably illegitimate, but are not tested.
I am already understood where was my mistake, process of undefined should return undefined
process() === undefined
That's a problem with your code, but let me figure out why.
WTF is wrong with random tests on JS?
"It should work with random inputs too - Expected: 'FUK AOME CUDDLES MESSHGE EHTSundefined', instead got: 'FUK AOME CUDDLES MESSHGE EHTS'"
"It should work with random inputs too - Expected: 'TRCC EAT CPSQDAundefined', instead got: 'TRCC EAT CPSQDA'"
"It should work with random inputs too - Expected: 'THM SMZRMT EMSSAIM MJGIEA ROTOR ZATundefined', instead got: 'THM SMZRMT EMSSAIM MJGIEA ROTOR ZAT'"
All random test fall down because "undefined" at the end
Brilliant solution)))
Loading more items...