The missing number

items is sorted and contains every whole number from 0 to len(items) except one. Write missing(items) that returns the missing number.

missing([0, 1, 2, 4, 5])  ->  3
missing([1, 2, 3])        ->  0
missing([0, 1, 2])        ->  3

The point is to practise binary search on a property: before the gap items[i] == i, after it items[i] == i + 1.

def missing(items):
    ...