Crate bubble_sort_scala[−][src]
This is a non-optimized implementation of the [bubble sort] algorithm for the book Rust Cookbook by Packt. This implementation also clones the input vector.
Examples
let v = vec![2, 2, 10, 1, 5, 4, 3]; assert_eq!(bubble_sort(&v), vec![1, 2, 2, 3, 4, 5, 10]);
Functions
bubble_sort | See module level documentation. |