Skip the linear search if the answer is already known.