+1 vote
461 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 449 views
0 votes
1 answer 423 views
0 votes
0 answers 271 views
+1 vote
1 answer 664 views
0 votes
1 answer 442 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!

Recent Badges

Doubtly Earned a badge
Doubtly Earned a badge
Doubtly Earned a badge

5.7k questions

5.1k answers

108 comments

650 users

...