Please tell me the mistake in my solution

question link - RAINBOWA Problem - CodeChef
my solution link- CodeChef: Practical coding for everyone

Consider the testcase:

1
3
6 7 6
2 Likes

i fix that mistake but still showing wrong answer

new solution link CodeChef: Practical coding for everyone

2 Likes

Consider:

1
14
1 2 3 4 5 6 7 7 6 5 4 3 2 1
1 Like

thank you :slightly_smiling_face:

Happy to help :slight_smile: 20 characters blah blah

1 Like