Given an array containing n distinct integers in the range [0, n], one number is missing from the array. Find the missing number.
Solve the problem using binary search and math