This an example of Binary Search and how to implement it. In this Binary Search you are assuming that you are searching through a sorted list.