At 7:55, why Prateek sir has written return-1?
Arrays- Binary Search
Hey @yajurkhurana
Sir assumed that our function will return -1 to main if element is not present in the array
So if he receives -1 from function he can print that element is not present
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.