I have tried multiple inputs via the compiler and they seem to be correct, yet the test cases fail. Could you please point out t he error in my code
Test cases failing
see this test case:
8
1 34 3 98 9 76 45 4
Expected Output
998764453341
Shouldnt the answer be 998764543431
yes my bad
but see test cases like
51
19867 22603 24383 19913 20137 8831 12236 2277 26700 244 28053 12886 30932 2313 1929 12320 30148 9097 10074 6397 8068 16779 8914 12378 7510 22678 5994 25507 5515 27145 25625 11456 5623 6586 30058 32224 24738 6110 6097 6773 28864 25129 17471 383 19428 8246 6900 19726 29552 7976 149
you are getting wrong answer
see this basic approach