MCPcopy Create free account
hub / github.com/QMHTMY/RustBook / tim_sort

Function tim_sort

publication/code/chapter07/tim_sort_without_gallop.rs:421–428  ·  view source on GitHub ↗

timSort 入口

(list: &mut [i32])

Source from the content-addressed store, hash-verified

419
420// timSort 入口
421fn tim_sort(list: &mut [i32]) {
422 if list.len() < MIN_MERGE {
423 binary_insertion_sort(list);
424 } else {
425 let mut sort_state = SortState::new(list);
426 sort_state.sort();
427 }
428}
429
430fn main() {
431 let mut nums: Vec<i32> = vec![

Callers 1

mainFunction · 0.70

Calls 3

binary_insertion_sortFunction · 0.70
lenMethod · 0.45
sortMethod · 0.45

Tested by

no test coverage detected