What are the advantages and disadvantages of a heap?

4 years ago
C Programming

Storing data on the heap is slower than it would take when using the stack. However, the main advantage of using the heap is its flexibility. That's because memory in this structure can be allocated and remove in any particular order. Slowness in the heap can be compensated if an algorithm was well designed and implemented.

0
Sanisha Maharjan
Jan 20, 2022
More related questions

Questions Bank

View all Questions