$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · medium · #267

What goes in the blank?

# halve the search space each step
mid = (lo + hi) ____ 2

Answer: // (also accepted: //, floor division)

Floor division keeps the midpoint an integer index in binary search.
Play Problem Solving ▸