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