Problem in my code

In the above code if I give input as:

7
1
2
3
4
6
3
10

Output:
true

Why?

Ok I don’t know why but now it’s working correctly.

hello @yashsharma4304

ok no issue… :+1::+1:

Now, when i test it for:
7
9
8
5
1
2
3
It is giving me false. But it is expected to give true.

u have given only 6 input

1 Like

Oh that was my mistake. Thank you. :slightly_smiling_face: :heavy_heart_exclamation: