linear search, better linear search, linear search with sentinel