+1 vote
170 views
in C program by (1.7k points)
edited

What are the advantages and disadvantages of a heap?

1 Answer

0 votes
by (1.7k points)
selected by
 
Best 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.

Related questions

0 votes
1 answer 207 views
0 votes
1 answer 126 views
0 votes
0 answers 84 views
+1 vote
1 answer 154 views
0 votes
1 answer 133 views
asked Oct 1, 2022 in Tailwind by Doubtly (98.9k points)

Doubtly is an online community for engineering students, offering:

  • Free viva questions PDFs
  • Previous year question papers (PYQs)
  • Academic doubt solutions
  • Expert-guided solutions

Get the pro version for free by logging in!

5.7k questions

5.1k answers

108 comments

538 users

...