Added cmc prefixes to enums used by heap and hashtables and fixed return type on treeset and hashset

This commit is contained in:
Leonardo committed 2019-07-10 16:57:46 -03:00
1 parent 0c883b0a74
commit 354cd538f8
13 files changed
+172 -164

No files matched your search

+1 -1
View File
@@ -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++)
{
+1 -1
View File
@@ -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++)
+1 -1
View File
@@ -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);