Help find error

Hello @akshitmehta,

Your code is failing for test cases like:

  1. 7
    12 4 4 78 90 45 23
    Expected Output:
    6

  2. 6
    2 1 1 1 2 3
    Expected Output:
    5
    Your output:
    4

Hope, this would help.
Give a like if you are satisfied.

yup thanks nice way i actually understood it clearly