None of the test cases are getting passed https://ide.codingblocks.com/s/204134
What is the issue with my code?
There are some mistakes in your code
1)The queue will be initialised with the start element whatever the case will be so, initialize it with 0 index, also run your for loop at line 22 from the i=1; i<k because 0 is already, btw it will not affect as you are checking for > element.
2)Also inside this loop, insert element only if the a[i]>=a[x] like the same way you has done for below loop, because we have to maintain the decreasing order of elements.
Try all these things