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
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 of ages array is not guaranteed. It implies having side effects after executing function.
Array.sort
ages
@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 collection data...
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...