Function rust_algorithm_club::searching::interpolation_search
source · [−]Expand description
Search in sorted sequences by checking the next position based on an linear interpolation of the search key.
Parameters
arr
: Slice to search in.target
: Object to search for.
Notes
Since interpolations only be applied on numeric types, we choose i32
to
avoid overkilling. If you desire a full functional trait of numeric types,
num crate would meet your needs.