more info for thiersort testing - seems like apply maybe has a bug
This commit is contained in:
parent
36189e8a3c
commit
9ac3a76209
12
ypsu.cpp
12
ypsu.cpp
@ -409,18 +409,26 @@ void thiersort_uintkey8(uint32_t *arr, int n) {
|
||||
malloc);
|
||||
|
||||
for(uint32_t i = 0; i < n; ++i) {
|
||||
printf("In: %d\n", tarr[i].key.u);
|
||||
printf("In: %d @%d\n", tarr[i].key.u, tarr[i].i);
|
||||
}
|
||||
|
||||
// Sort: O(n*loglogn on amortized on random input):
|
||||
/*
|
||||
thiersort8_uintkey(
|
||||
tarr,
|
||||
n,
|
||||
malloc,
|
||||
free);
|
||||
*/
|
||||
ts_quicksort_inplace(
|
||||
tarr,
|
||||
0, // from
|
||||
n, // to
|
||||
ts_lt_uint,
|
||||
nullptr);
|
||||
|
||||
for(uint32_t i = 0; i < n; ++i) {
|
||||
printf("Out: %d\n", tarr[i].key.u);
|
||||
printf("Out: %d @%d\n", tarr[i].key.u, tarr[i].i);
|
||||
}
|
||||
|
||||
// Apply: O(n)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user