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.
how parseInt is able to extract the numbers from the string?
🐄
It's slow
O(NlogN)
because of sort algorithmYou can do
O(N)
Also recursive algorithms are quite slow in comparison to iterative ibes
Beautiful one
It kinda bothers me that I am first TypeScript solver who used recursion (and clean style), as I was asked. I haven't seen solutions in other languages but all of the TS ones are very amateurish, are TS users stupid or what :-/
Unnecessary parameter name
Thank you for your feedback =)
Thank you for explanation, I was able to solve it.
Well,
Array.range(-1,1)
should return[-1]
. You've read the description wrong:Honestly, that line is still misleading, since
start + count
isn't part of the array. However, the second argument isn't an upper bound on the range, but the number of elements. Some other examples to make this clear:HTH.
Guys come on, I need help. The tests are broken, it says first value of the result array should start with -1 and it starts with -1. I can't finish this and I really want.
I don't know how to change the code to make it work when it already returns correct result but the tests are broken. Creator of the kata or anyone, please?
There is no way to contact anyone directly, so I can only write here.
My solution fails on test Array.range(-1, 1), it returns [ -1, 0 ] (I think that's correct result), but I got error message "The array's first value should begin with start (-1 in this case)".
What is wrong? Please help, I want to finish this.
This comment is hidden because it contains spoiler information about the solution
Instructions not clear, dick stuck in prototype.
I have really enjoyed this, thank you for kata!
well, I am not very proud of it but it passed all the tests ;)