Code
Given the following definition of a NodeT
struct NodeT {
DataT data;
NodeT * next;
};
- [4 points] Write a function which takes a pointer to the first element of a properly formed linked list of
NodeT
and frees all associated memory.
- [6 points] Write a function which takes a pointer to the first element of a properly formed linked list of
NodeT
, makes a deep copy and returns a pointer to that copy.