Heyy please check my code.
Link of my code: https://ide.codingblocks.com/s/263389
Check your code with this input:
5
1 2 3 5 6
1
4
Expected O/p:
-1 -1
If that query is not in that array, you are suppose to print -1.
But your code is not giving any output for this.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.