Question:What are the advantages and disadvantages of a heap? 

Answer 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. 

+ Report
Total Preview: 1897
What are the advantages and disadvantages of a heap?
Copyright © 2024. Powered by Intellect Software Ltd