BSearch(data, start, end, key) if the start is greater than the end return false otherwise find the middle if the key is at the middle item return true. else if the key is less than the middle item , search the lower end of the array else search the higher end of the array
MergeSort(data, start, end) Split the array into two parts. Sort the two smaller parts. Merge the two arrays
Merge(ary1, size1, ary2, size2, dest) while there is data in both ary1 and ary2 append the smallest to dest If there is data left in ary1 append this to dest If there is data left in ary2 append this to dest