CS 2213 Advanced Programming
Final Review


Here is a list of thing for the final exam.


Heap Sort:

a) Show the steps in generating the heap (largest at root) for the following array:

b) For the resulting heap, show the steps in sorting it (smallest on top). Draw a tree for each iteration.


Finding the shortest path from node 1 to all other nodes.
Construct the resulting tree.


Practice with doubly linked lists:

typedef struct nodeentry {
   stringval sval;
   struct nodeentry *next;
   struct nodeentry *prev;
} nodeentry;

typedef struct {
   nodeentry *front;
   nodeentry *rear;
} doublelist;
static doublelist q;

int insert_after(stringval sval, nodeentry *nentryp);
int insert_before(stringval sval, nodeentry *nentryp);
stringval remove(nodeentry *nentryp);