CSCI 15, Lab Assignment 8 Due 11/28/2018, 15 Points Linked List A data structure is a software “construct” that allows data to be stored, retrieved and accessed in a particular manner. Individually stored data is called a “node”. Capabilities include: . Adding new data elements either in front or back of the data structure . Changing values in existing nodes . Finding a particular node based on a value Display the contents of the data structure (front to back or back to front) A linked list allows an “‘unlimited” number of nodes using pointers (this is NOT an array nor is it a vector). 1. 2. Store an integer value in the nodes Add a node (allow user to add a node either in front or append in back of the linked list, we will keep this “simple”). Since we are using pointers, the list can be potentially “unlimited” in size and number of nodes Display the value (front to back AND back to front) 3. You might wish to present the user interface as a “menu” with one option as “Quir” (end this application). Allow user to run this as many times as they wish. You have got to keep track in the node of several data items as well as in the application: Pointer to the previous node location of this list in memory (first node in list has nothing in front hence NULL) Data Element (integer in this case, but can this be expanded?) Pointer to the next node location of this list in memory (last node in list has nothing in back hence NULL) Since the node has to keep track of several data items, it would have to be a “struet” The pointers would have to be of that user defined “data type” Keep track of the number of nodes (every time you add a node) Keep track in memory of where the First Node and Last Node memory locations The command “new” creates a new memory location (ie, p-new Numbers) . . . · Add a Node to the front: 1. If there are NO nodes in the list: a. Create a new node b. Set the First to its memory location c. Set its Previous and Next to NULL d. Set the value for the data element e. Set a memory pointer to keep track of where it is (i.e. the First node and the Last node) You might want to keep track of how many nodes you have (ie, every time you add a node) E
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more