Duh,
my bad. My solution failed on [ 9, 9, 7, 6, 5 ] from comment assertion. I patch the code and tada.. it works :) and I see the nature of the solution of this problem.
interesting!
17
11
1