For reference, from helper_random_array_almost_desc_u32:
let mut array = helper_random_array_descending_u32(size);
array.reverse();
for _ in 0..((size as f64).log2() as usize) {
let i = rng.gen_range(0, size);
let j = rng.gen_range(0, size);
array.swap(i, j);
}
The array.reverse() undoes the reversal in helper_random_array_descending_u32; looks like this ends up being equivalent to helper_random_array_almost_asc_u32?
For reference, from
helper_random_array_almost_desc_u32
:The
array.reverse()
undoes the reversal inhelper_random_array_descending_u32
; looks like this ends up being equivalent tohelper_random_array_almost_asc_u32
?