Where is Rust's implementation of generic algorithms on collections?
The slice primitive type.
When is linear search better than binary search?
If the sequence is short and not sorted—the time it takes to sort it would be longer than a simple linear search.
Potential job interview question: What are stable and unstable sorting algorithms?
Stable sorting algorithms maintain a relative order between equal elements, while unstable sorting algorithms don't. This means that if there are sequences of the same number, the entire block will show up in the sorted collection exactly in the same order.
What is a bad behavior of Quicksort that pattern-defeating Quicksort mitigates?
The choice of bad pivots is the most important problem that is mitigated. This is done by employing strategies to improve the selection or, if all else fails, use heap sort to achieve...