binary search: swap assert parameters