Tips for Next Week's Lab
Linked lists of strings and char s
- Build a linked list of strings
- Define new type of type of LL nodes
typedef struct _Node {
char *data; // a pointer to string data
struct _Node *next;
} NodeT;
|
- Adapt known LL functions to this new node type (if necessary)
-
makeNode(), insertHead(), insertTail(), printList(), freeList()
- which of these functions can be used unchanged?
- Write
main() function
- to process user input
- and call
insertHead() or insertTail() as required
|