CS计算机代考程序代写 Implement a properly working heap

Implement a properly working heap
Make your own versions of newvec() and freevec().
freevec() must recycle memory completely, so that it can be used
again by newvec().
Show that it works by modifying your linked list program as follows
and making it use your new newvec() and freevec() instead of the
library versions.
Your linked list program should be modified so that it allows
deletions from the linked list. If the user enters the string “-”
then the next string entered is to be removed from the linked list,
the memory that it and its linked list node occupied should be
recycled by freevec().
So if the user enters
one two three four five six seven eight nine – three – seven ten
then the list would contain
one two four five six eight nine ten
Demonstrate your program working with an example that is good enough
to show that memory is being properly recycled.
Remember, subit a single document containing any comments to me, your
code, and a screen capture of it running.

Leave a Reply

Your email address will not be published. Required fields are marked *