why did we assign left and right =-1 and why did we not assign it with 0?
Assigning of negative values
hello @prateeknanda10
we want to intitialise left and right with a value that cannot be a possible answer .
0 can be a possible answer thats why we used -1 ( u can use any negative value ).
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.