public static void main(String args[]) {
        CircularBinarySearch cbs = new CircularBinarySearch();
        int arr[] = { 7, 10, 8, 5, 2, 3, 5 };
        System.out.print(cbs.search(arr));

        int arr1[] = { 5, 8, 10, 7, 5, 3, 2 };
        System.out.print(cbs.search(arr1));

        int arr2[] = { 3, 5, 7, 10, 8, 5, 2 };
        System.out.print(cbs.search(arr2));

        int arr3[] = { 8, 5, 2, 3, 5, 7, 10 };
        System.out.print(cbs.search(arr3));

        int arr4[] = { 5, 3, 2, 5, 8, 10, 7 };
        System.out.print(cbs.search(arr4));

        int arr5[] = {100,20,10,5,2,8,11,16,19};
        System.out.print(cbs.search(arr5));

        int arr6[] = {200,2,10,15,20,80,110,160,190};
        System.out.print(cbs.search(arr6));

        int arr7[] = {5,10,20,50,200,800,1100,1600,1900,2};
        System.out.print(cbs.search(arr7));

        int arr8[] = {2,5,10,20,50,200,800,1100,1600,1900};
        System.out.print(cbs.search(arr8));
        
        int arr9[] = {3,1,8,5,4};
        System.out.print(cbs.search(arr9));
        
    }
http://www.careercup.com/question?id=4877486110277632
Given a circle with N defined points and a point M outside the circle, 
find the point that is closest to M among the set of N. O(LogN)
Test cases
1) smallest element at center
2) smallest element at left/right end
3) largest element at center
4) smallest element at left side
5) smallest element at right side
src/com/interview/binarysearch/CircularBinarySearch.java