## Binary Search in an Array

Suppose that we have a sorted array haystack, with length N and a needle. Let's also suppose that the array is sorted in a non decreasing order. Binary search works by checking the

Suppose that we have a sorted array haystack, with length N and a needle. Let's also suppose that the array is sorted in a non decreasing order. Binary search works by checking the

Sequential or Linear Searching is used to search unsorted arrays. It is a simple algorithm which can serve as a good introduction to algorithms. Suppose we have an array haystack of size N