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
Cool solution.
Could someone give an explanation? I understand the overall idea but get lost in
const count = ...expression
the slicing is smart, but causes unnecessary calculations instead of just cutting off the less than 4 cases, no?
Ohh the slicing is smart. I just handle the edge cases with n < 3 by early return.
This comment is hidden because it contains spoiler information about the solution
reviewing the code, it got a bit confusing, i will practice refactoring to apply the solution with recursion
This comment is hidden because it contains spoiler information about the solution
Good and clear solution.
But I prefer not to mutate function arguments such as objects and arrays. It can lead to unexpected results outside the function. But for this kata it is OK.
nice solution
❤️
lovely solution!
Array.sort
makes in-place operations so inmutability ofages
array is not guaranteed. It implies having side effects after executing function.@wailmadrane
To be able to get the desired amount of the tribonacci sequence.
For example, in this scenario I want to test you only 1 item of the sequence:
Test -> tester([1, 1, 1], 1, [1]);
Input Sequence -> [1, 1, 1]
Desired Quantity -> 1
Expected Sequence -> [1]
why do you slice?
WoW
Great !
Loading more items...