enter image description here
the above implementation is the wikipedia’s version of binary search ,
my simple doubt here is that is there any relation between the ceil function that is used for calculating the mid and the statement of moving L to M and not M + 1 { this is the standard implementation of binary search }
my simple doubt here is that is there any relation between the ceil function that is used for calculating the mid and the statement of moving L to M and not M + 1 { this is the standard implementation of binary search }
sukesh reddy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1