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.
if you have several 1111 in a row, they won't be splitted by 0 inside and will represent single string in your array before joining. that's why all these 111 will be counted as one in length, which is wrong. you first need to join a string consisnting only of 1, only after you can take its length.
someone explain please
i was confuzzled on this problem for an entire month
when i solved it in 7000 lines of code only to see this
i just quit
This comment is hidden because it contains spoiler information about the solution
great solution mate, can anyone tell me that, One line solution is better or mine is better?
i can write in one line but i think mine is more easy to understand, is spliting one line code to 2 or more is a bad habbit?
I love it, so clever 😁
This comment is hidden because it contains spoiler information about the solution
But do we need .join('') here? Can we just count the length of array?? (I am a beginner ^^;)
I never thought of this way! Pretty cool :)
yoo same answer lets goooooo
This is clever but it doesn't perform well. Split and joun are iterating the whole array.
Thats brilliant solution, but only one issue that it's really slow in comparing with another one, for example my or the next after yours
Handling negative inputs isn't part of the spec.
What happens if input is -1. Or did I understood this kata wrong...
OMG!!! I bombed so hard after seeing this..lol! SPLIT() FOR LIFE!!!
Loading more items...