BlackBerry Interview Question

write a binary search algorithm