Why code is not giving output?

https://ide.codingblocks.com/s/188813

@uthyasani
hello pushpita,
your logic is not correct.
here is correct algorithm
image

1 Like

I applied this algorithm,but same problem no output,I think passing array through the function is creating the problem.please check I wrote it correctly or not.

@uthyasani
hello puspita,
image
In line no 11. it should be while(l < r) in the place of for loop