pub fn RadixQuicksort(arr_py: &PyList) -> PyResult<Vec<&str>>
Expand description

Sorts a list of strings using 3-way Radix Quicksort.

§Arguments

  • arr_py - Python list of strings to be sorted.

§Returns

A sorted vector of strings.

§Examples

let gil = Python::acquire_gil();
let py = gil.python();
let arr_py = PyList::new(py, &["bc", "ab", "aa", "cb", "ac", "ca", "bb", "ba"]).unwrap();
let sorted_arr = radix_quicksort(arr_py).unwrap();
assert_eq!(sorted_arr, vec!["aa", "ab", "ac", "ba", "bb", "bc", "ca", "cb"]);