Corning Community College CSCS2320 Data Structures ~~TOC~~ ======Project: SLL3====== =====Errata===== This section will document any updates applied to the project since original release: * __revision #__: (DATESTAMP) =====Objective===== This is a transitional project, making a few modifications to the list struct forcing some changes to a few functions so that we can better explore the next topic (in **sll4**). As such, while this is a standalone project, it should be considered a small one, and one that is given out in combination with another (again: **sll4**), so be mindful of time management. You will need to complete this project prior to upgrading to **sll4**. =====Project Overview===== ====list.h==== For this project, we need to make a couple modifications to the list struct (which you can also check out in **inc/list.h**): struct list { Node *first; // pointer to start of list Node *last; // pointer to end of list struct list *after; // pointer to the next list unsigned long int qty; // number of nodes in list }; typedef struct list List; // because we deserve nice things Specifically, we have an after pointer, so that we can point to an entirely separate list, along with a newly added qty variable, which will keep track of the number of nodes in the list. To implement **qty**, all list functions that perform manipulations to the list will need to see some updating (**insert()**, **append()**, **obtain()**, **cplist()**, and **mklist()**). **mklist()** should also set the list's **after** pointer to a sane initial state (NULL). =====Expected Results===== To assist you in verifying a correct implementation, a fully working implementation of the node library, list library (with new modifications), and group library should resemble the following: ====list library==== ===sll3 list functions=== Here is what you should get for the specific functions relevant to sll3: lab46:~/src/data/sll3$ make check ====================================================== = Verifying Singly-Linked List Functionality = ====================================================== [mklist] Total: 21, Matches: 21, Mismatches: 0 [cplist] Total: 14, Matches: 14, Mismatches: 0 [insert] Total: 21, Matches: 21, Mismatches: 0 [append] Total: 21, Matches: 21, Mismatches: 0 [obtain] Total: 44, Matches: 44, Mismatches: 0 ====================================================== [RESULTS] Total: 121, Matches: 121, Mismatches: 0 ====================================================== lab46:~/src/data/sll3$ ===entire list=== Here is what you should get for all the functions completed so far in the list library (sll0+sll1+sll2+sll3): lab46:~/src/data/sll3$ bin/verify-list.sh ====================================================== = Verifying Singly-Linked List Functionality = ====================================================== [mklist] Total: 21, Matches: 21, Mismatches: 0 [insert] Total: 21, Matches: 21, Mismatches: 0 [displayf] Total: 10, Matches: 10, Mismatches: 0 [getpos] Total: 8, Matches: 8, Mismatches: 0 [setpos] Total: 9, Matches: 9, Mismatches: 0 [append] Total: 21, Matches: 21, Mismatches: 0 [searchlist] Total: 11, Matches: 11, Mismatches: 0 [cplist] Total: 14, Matches: 14, Mismatches: 0 [displayb] Total: 10, Matches: 10, Mismatches: 0 [compare] Total: 15, Matches: 15, Mismatches: 0 [obtain] Total: 44, Matches: 44, Mismatches: 0 [clearlist] Total: 3, Matches: 3, Mismatches: 0 [rmlist] Total: 3, Matches: 3, Mismatches: 0 [swapnode] Total: 9, Matches: 9, Mismatches: 0 [sortlist] Total: 27, Matches: 27, Mismatches: 0 ====================================================== [RESULTS] Total: 226, Matches: 226, Mismatches: 0 ====================================================== lab46:~/src/data/sll3$ =====Submission===== {{page>haas:fall2015:common:submitblurb#DATA&noheader&nofooter}}