Added cmc prefixes to enums used by heap and hashtables and fixed return type on treeset and hashset
This commit is contained in:
1 parent
0c883b0a74
commit
354cd538f8
13 files changed
+172
-164
No files matched your search
@@ -19,7 +19,7 @@ HEAP_GENERATE(h, heap, static, int)
|
||||
|
||||
int main(int argc, char const *argv[])
|
||||
{
|
||||
heap *h = h_new(32, MaxHeap, intcmp);
|
||||
heap *h = h_new(32, cmc_max_heap, intcmp);
|
||||
|
||||
for (int i = 1; i < 101; i++)
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@ HEAP_GENERATE(h, heap, /* FMOD */, int)
|
||||
int main(int argc, char const *argv[])
|
||||
{
|
||||
// Create a new max heap with an initial capacity of 100
|
||||
heap *my_heap = h_new(100, MaxHeap, intcmp);
|
||||
heap *my_heap = h_new(100, cmc_max_heap, intcmp);
|
||||
|
||||
// Add elements to the heap
|
||||
for (int i = 0; i < 20; i++)
|
||||
|
||||
@@ -218,7 +218,7 @@ int main(int argc, char const *argv[])
|
||||
}
|
||||
|
||||
/* Sorting using a Heap */
|
||||
Heap *sort = hp_new(hm_count(result), MaxHeap, cmp_wcpair);
|
||||
Heap *sort = hp_new(hm_count(result), cmc_max_heap, cmp_wcpair);
|
||||
|
||||
/* Add key-value pairs to Heap for sorting */
|
||||
for (HashMap_iter iter = result->it_start(result);
|
||||
|
||||
Reference in new issue
Block a user