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.
Damn you doing good in that 2 years man
Very good!
Try a conditional in the default case:
two for loops has a time complexity of O(n^2), while this approach only takes O(n).
I've tested the two approaches with 10000 numbers and the 2 loop approach was 65 ms, this one was 8 ms, so 8x faster. I've done it with an object, which is just as fast as a map in this case.
Would two for loops not have been faster?
Yay close to mine <3
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Thanks, added random tests.
deepStrictEqual is redundant coming from JS to TS since strict type checking is included
So I have changed this to deepEqual
Thanks for feedback.
No random tests
Any reason why
deepStrictEqual
is used considering the fact that the array is of a fixed type and notany
??Great! Keep up the good work!!!
All typescript katas have been adapted to the feedback
I'll remember the proper protocol for future translations.
Thanks for your time in reviewing, I learned a lot :p
Thanks, I'll pick this up now (my React is showing) <.<
One last thing ~~
export function
should be used (default
remove)Loading more items...