Binary search for dictionary