Please help sollution on working kindly help me correct it https://ide.codingblocks.com/s/141381

please help sollution on working kindly help me correct it

Hello @kartiksaxena2000,

There are logical errors in your code.
I have modified your code, please refer to the comments:

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

can you please tell what was i going wring with

Hello @kartiksaxena2000,

  1. The condition of while loop is wrong.

  2. For the if(a[mid]<a[mid-1])
    print mid-1

I hope, it is clear now.

1 Like