Implement QuickSort

This commit is contained in:
2026-05-08 04:33:59 -05:00
parent b6b2500944
commit de5493e7c6
5 changed files with 101 additions and 13 deletions

View File

@@ -1,7 +1,7 @@
#include "include/types.h"
#include "include/radix.h"
int _seperate_pos_neg(lsort_array_i* array, lsort_array_i* pos_array, lsort_array_i* neg_array) {
static int _seperate_pos_neg(lsort_array_i* array, lsort_array_i* pos_array, lsort_array_i* neg_array) {
for (int i = 0; i < array->count; i++) {
if ((0x80000000 & array->items[i]) == 0x80000000) {
lsort_array_i_append(neg_array, array->items[i]);
@@ -12,7 +12,7 @@ int _seperate_pos_neg(lsort_array_i* array, lsort_array_i* pos_array, lsort_arra
return 0;
}
int _sort_items(lsort_array_i* numbers, lsort_array_i_array* buckets) {
static int _sort_items(lsort_array_i* numbers, lsort_array_i_array* buckets) {
int byte_check = 0x0000000F;
for (int i = 0; i < 8; i++) {