Expected output dosenot match with solution


#1

I tried checking for input
6 8 7 8 5 4 9
21 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

the expected output is 64 64 64 64 64 64 64 64 64 64 64 64 27 27 27 27 27 27 8 7 5
the correct output should be 64 64 64 64 64 64 64 64 64 64 64 27 27 27 27 27 27 8 7 5 5

Anyone please tell , if i am thinking in right direction.


#2

1st elements here means element at index 0