Add minor adjustments/clean-up

This commit is contained in:
2025-10-06 18:30:32 -05:00
parent 095ba92914
commit 3fcd09e7c0
4 changed files with 19 additions and 9 deletions

View File

@@ -7,6 +7,7 @@ typedef struct dlos_ComparableNode {
typedef struct dlos_Heap {
int size;
dlos_ComparableNode *arr;
int arr_size;
int (*compare)(dlos_ComparableNode *a, dlos_ComparableNode *b);
} dlos_Heap;
@@ -36,7 +37,12 @@ void dlos_max_heap(dlos_Heap *h);
// for (int i = 0; i < test_size; i++) {
// a[i].value = &data_storage[i];
// }
// dlos_Heap heap = { .size = test_size, .arr = a, .compare = compare_nodes };
// dlos_Heap heap = {
// .size = test_size,
// .arr = a,
// .arr_size = test_size,
// .compare = compare_nodes
// };
// dlos_max_heap(&heap);
// dlos_sort_heap(&heap);
// for (int i = 0; i < test_size; i++) {