+ 1

How to do a Min heap code in C++ Without using arrays??

My Professor gave me an assignment to make a code of a min heap but i can't use arrays to do it. And i've been having a lot of trouble finding a way to actually make one without it. Any ideas of how could i do it just using nodes, recursion or something else?

1st Jun 2019, 8:03 PM
MATIAS CANALES BENAVIDES
3 Respostas
0
Use a linked list? You can easily make one by messing with pointers.
1st Jun 2019, 8:05 PM
Drax
Drax - avatar
0
I can't use Linked list either, i already asked if i could :(
1st Jun 2019, 8:07 PM
MATIAS CANALES BENAVIDES
0
The classic heap structure doesn't use an array. The heap structure is similar to a binary search tree. https://www.sololearn.com/learn/13594/?ref=app
2nd Jun 2019, 1:58 AM
Jared Bird
Jared Bird - avatar