binary search: recursive and iterative