Skip to content

Implementing a priority queue with a maxheap and then with a treap and comparing the results.

Notifications You must be signed in to change notification settings

Theoioan12/Maxheap-vs-Treap-Comparison-PQ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Buliga Theodor Ioan 323 CA

In fisierul filegenerator.c se regasesc bucatile de cod care m-au ajutat sa generez fisierele de test. Avand in vedere ca am mai schimbat din el, o parte din liniile folosite au mai fost schimbate.

In fisierul maxheap.c se regaseste implementarea cozii de prioritate cu un maxheap. Analog, in fisierul treap.c se regaseste implementarea cu un treap.

In folderul trp se regasesc solutiile .out pentru testarea treapului, iar mxhp cele pentru testarea maxheapului. In folderul in se vor regasi testele.

Ca sa rulati testele, trebuie compilate ambele fisiere.c cu gcc, apoi rulate manual sub forma "./a.out test1.in mxhp/test1.out" pentru maxheap sau "./a.out test1.in trp/test1.out" pentru treap. Exemplul e facut pentru testul 1, regula ar fi testJ.in si testJ.out unde J ar reprezenta numarul testului.

Vreau sa imi cer scuze ca a fost o tema realizata cam pe graba, stiu ca lipseste makefileul si promit sa ma revansez pentru cea de-a doua tema.

Surse de unde am luat implementarile structurilor: https://www.geeksforgeeks.org/priority-queue-using-binary-heap/ - maxheap https://www.geeksforgeeks.org/implementation-of-search-insert- and-delete-in-treap/ - treap

In fisierul 4.pdf este documentul final.

Releases

No releases published

Packages

No packages published

Languages