Fix in find_idx algorithm

Find algorithms didn't consider the case when the value is less than the lower, but there's still space in the list.
Optimization in build_initial_k_list

The paper proposed a strage approach to the build of an initial k list. The algorithm has been rewritten exploiting function used during the backtrack pahse.