package binarysearch;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * Tester class to test the binary search algorithm
 * @author Winston Prakash
 */
public class BinarySearchTester {
    
    public static void main(String[] args) {
        Integer[] dataArray = { 2, 4, 6, 7, 9, 12, 34, 45, 56, 99, 102};
        System.out.println("\nBinary Search Tester");
        for (int i =0; i< dataArray.length; i++){
            System.out.print(dataArray[i] + "[" +  i  + "] ");
        }
        System.out.println();
        int value = 12;
        System.out.println("The index of value " + value + " is " + BinarySearch.search(dataArray, value));
    }
}