skip to Main Content
The smarter way
to do assignments.

Please note that this is just a preview of a school assignment posted on our website by one of our clients. If you need assistance with this question too, please click on the Order button at the bottom of the page to get started.

 
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

GET HELP WITH THIS ASSIGNMENT TODAY

Clicking on this button will take you to our custom assignment page. Here you can fill out all the additional details for this particular paper (grading rubric, academic style, number of sources etc), after which your paper will get assigned to a course-specific writer. If you have any issues/concerns, please don’t hesitate to contact our live support team or email us right away.

How It Works        |        About Us       |       Contact Us

© 2018 | Intelli Essays Homework Service®

Back To Top