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.
This comment is hidden because it contains spoiler information about the solution
It is possible to use console.log straight into the code mirror and messages will be outputted in the output panel instead of the browser console.
I think it's easier to try your code on your computer throught NodeJS. Once your code is debugged and it works you can copy & paste your solution.
You can just print the input in your functions, it's enough for debugging this.
Moreover, you can event print the preloaded dictionary if you can't live without IDE. :)
As Joz said there are more than 4. Regex takes care of that smoothly, if you list them all in an array you might forget some. So any smiley having
:
or;
as eyes,-
or~
as a nose(or no nose) and)
andD
as a mouth. Also to find if an item in present in an array there are simpler ways: check out this or this.This comment is hidden because it contains spoiler information about the solution
Can you post the testcase? In which language did you train it?
Thanks. Good tip :-)
@Cptnprice,
' Sr2\tynF' == ' ' + 'S' + 'r' + '2' + '\t' + 'y' + 'n' + 'F'
My apologies, JohanWiltink has the right statement.
Hi.You said that '' and '/' are not allowed but test still says ✘ ' Sr2ynF' should equal ' Sr2\tynF'
Yes, here sorting is not that easy. Java? The "[]" shows where the difference is.
\t
inSr2\tynF
is a single character. It's a tab (which is whitespace).It's not about
\
or/
(which, on their own, are special).They are not allowed, give em the ol' boot!
Hi baxtex. Sorry for the late reply, I've been away from Code Wars for some time. Your solution should return the number of cycles it takes to get to 1.
Loading more items...