n// function prototype
nint binarySearch(int list[], int size, int key);
n
n// function definition
n// this function returns the location of key in the list
n// -1 is returned if the value is not found
nint binarySearch(int list[], int size, int key) {
n int left,
right, middle;
n
n left =
0;
n right = size
-1;
n (refer to next slide)
n