What I wrote was binary search, not linear search.