binary search negative indices