radix sort pog
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#ifndef LSORT_H
|
||||
#define LSORT_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
int check_sorted(lsort_array_i* array);
|
||||
|
||||
#endif
|
||||
8
include/radix.h
Normal file
8
include/radix.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef LSORT_RADIX_H
|
||||
#define LSORT_RADIX_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
int lsort_radix(lsort_array_i* array, lsort_array_i* return_array);
|
||||
|
||||
#endif
|
||||
@@ -15,20 +15,24 @@ typedef struct {
|
||||
int* items;
|
||||
} lsort_array_i;
|
||||
|
||||
lsort_array_i* lsort_create_int_array();
|
||||
|
||||
lsort_array_i* lsort_array_i_create();
|
||||
void lsort_array_i_destroy(lsort_array_i* array);
|
||||
|
||||
void lsort_array_i_append(lsort_array_i* array, int number);
|
||||
int lsort_array_i_swap(lsort_array_i* array, int indexA, int indexB);
|
||||
|
||||
void lsort_array_i_print(lsort_array_i* array);
|
||||
|
||||
|
||||
typedef struct {
|
||||
size_t count;
|
||||
size_t capacity;
|
||||
lsort_array_i** items;
|
||||
} lsort_array_i_array;
|
||||
|
||||
// struct lsort_int_link {
|
||||
// int value;
|
||||
// lsort_array_i* next;
|
||||
// };
|
||||
void lsort_array_i_array_append(lsort_array_i_array* array, lsort_array_i* item);
|
||||
void lsort_array_i_array_destroy(lsort_array_i_array* array);
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user