binary search for bins and while loop for categorical feature bins