Practice
Learn
← Quit
0 / 0 correct
Rust
Medium
1 of 10
What is the difference between sort() and sort_unstable() on slices?
A
They are identical
B
sort is stable (equal elements keep order) and may allocate; sort_unstable is in-place and usually faster
C
sort is O(n^2)
D
sort_unstable may give wrong results