DEV Community

Mujahida Joynab
Mujahida Joynab

Posted on

Binary Search

Monotonic Function :
Increasing or decresing with respect to time .

Either increasing or decreasing . Not both .

f(x) = x^2 + 10

if l = 0 , r = 7
mid = (l+r)/2
mid = (0+7)/2 = 3

Top comments (0)