In today’s lab, you will complete the implementation of stack and queue data structures using linked lists. Unlike our previous labs, this one does not have separate parts or exercises; you’ll need to complete the entire implementation, but it is up to you to decide what to do and in what order. The only requirement, other than standard good C coding practices, is that you use linked lists to store the data held in your stack and queue.
Download a copy of the starter code archive stacks-queues-lists.tar.gz and run the following commands to get started:
$ cd ~/csc161/labs
$ tar xvzf ~/Downloads/stacks-queues-lists.tar.gz
$ cd stacks-queues-lists
The provided code includes simple driver programs that help you test your data structures, similar to what was provided in the linked list lab.
You’ll also find interfaces for the stack and queue ADTs in header files, with empty implementations in C files.
You should only edit the struct definitions in the provided header files, and function implementations in the .c file for each data structure.
Do not edit the driver programs, and do not change the functions that make up the interface for the stack or the queue.
You are welcome to add additional structs to the string_stack.h and string_queue.h header files if necessary.