Kindly see my code for Sorted array and tell me my mistake

link to code: https://ide.codingblocks.com/s/68209

Hi Kunal, pls see that your code is failing for testcase:

// Input
6
1 2 3 4 5 5

// Expected Output
true

// Your Output
false

and also for type:

// Input
6
1 2 3 3 4 5

// Expected Output
true

// Your Output
false

Pls try to do rectify your code for these tetcases.

Hope it helps :slight_smile:

Hey Kunal,
As you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.

Please mark your doubts as resolved in your course’s “ Ask Doubt ” section, when your doubt is resolved.