Thanks! Yeah bisection is tricky, I always have to think twice if I want to make left equal to middle or middle plus one, depending if you want the first greater than or the last smaller than… it's also the most beautiful algorithm because it perfectly shows the link between structure and efficiency.
Thanks! Yeah bisection is tricky, I always have to think twice if I want to make left equal to middle or middle plus one, depending if you want the first greater than or the last smaller than… it's also the most beautiful algorithm because it perfectly shows the link between structure and efficiency.