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.
Good one, these sorting problems are always fun!!
I started this one with a vague idea, to my surprise it worked in the end
Good question
Good question
Good Question!
Good Question!
two nested loops, 8 people voted this as clever, how come?
What else you want me to do?
5 and -4 are not consecutive but (-5,-4) and (-4,-5), (4,5) ,(5,4) are ,
look at the number line below if you still don't get it
-5 -4 -3 -2 -1 0 1 2 3 4 5 (-4 and -5 are next to each other, but 5 and -4 are at opposite ends)
your test case is invalid!!!!!
Good Solution, instead of calculating array length in every iteration, it is better to store it in a variable outside the loop and use that variable later
good question, it is a 6kyu in my opinion
This comment is hidden because it contains spoiler information about the solution
Regex is a beast that will eat you if you don't tame it properly, nevertheless, fun challenge solved it without regex
We have to check the array from the end which I guess is not in the description, this line doesn't make sense " return an array that has 1 added to the value represented by the array.", may be you can rewrite it as
Given an array of integers of any length, increase the value of the first element starting from end by 1 and return it. If the interger becomes a double digit number after incrementing make it 0 and continue till you find an integer which becomes less than 10 even after incrementing.
If no number satisfies the above condition append 1 to array in the begining and make all elements 0
This comment is hidden because it contains spoiler information about the solution
Loading more items...