Pls help the code is failing for elemnt not present in the array
code link…
https://ide.codingblocks.com/s/164419
Help rahul to search
run time error in one of the two test cases
hey @GreatCoderboy123, please refer to this thread for runtime issue Help rahul search code showing run error
Is it possible to do the same thing using iterative solution
I have made the code as an iterative solution since I have not reached recursion yet and it is showing TLE error in some other compiler only for the case in which the number is not present in the array
hey @GreatCoderboy123, as question has not mentioned constraints, you can increase the size of array upto 10000 to avoid run time error
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.