Because you linked to the original kata, which requires that the beggars choose the larger pile each time, unless they are equal, in which case they will choose the leftmost pile. Since there are no equal piles in this array, each beggar would choose the larger pile each time, leading the order 5, 4, 3, 2, 1. Your kata requires that they always choose the leftmost pile no matter what, but unless you actually state that, there is no way to know. It needs to be rewritten.
I didn't quite understand how the sequence should continue?
For example ({5,3,2}, {0,1,2}, 4) = 17 How does that happen
If we assume that
0 = 5
1 = 3
2 = 2
3 = 5 + 3 + 2 = 10
Because you linked to the original kata, which requires that the beggars choose the larger pile each time, unless they are equal, in which case they will choose the leftmost pile. Since there are no equal piles in this array, each beggar would choose the larger pile each time, leading the order 5, 4, 3, 2, 1. Your kata requires that they always choose the leftmost pile no matter what, but unless you actually state that, there is no way to know. It needs to be rewritten.
The correct result for your example is
This comment is hidden because it contains spoiler information about the solution
Hire this man!
Two years ago!! Am probably too late lol
This comment is hidden because it contains spoiler information about the solution
No problem.
Yea thanks, I see now!
I think you confused something:
I didn't quite understand how the sequence should continue?
For example ({5,3,2}, {0,1,2}, 4) = 17 How does that happen
If we assume that
0 = 5
1 = 3
2 = 2
3 = 5 + 3 + 2 = 10
fat discord mod
This comment is hidden because it contains spoiler information about the solution
retired
It's retired. You cannot solve it anymore.
This comment is hidden because it contains spoiler information about the solution
Loading more items...