Implement linear search algorithm