Question: Design and implement the Self-Organizing (Unsorted) Singly-Linked List with Move-To- Front & Transpose ADT. You should include search (linear search using no self-organizing heuristic), search_mtf
Design and implement the Self-Organizing (Unsorted) Singly-Linked List with Move-To- Front & Transpose ADT.
You should include search (linear search using no self-organizing heuristic), search_mtf (linear search using the move-to-front self-organizing heuristic), search_t (linear search using the transpose self-organizing heuristic), insert and showSOLL.
The insert operation scans the entire list to verify that the item is not already present and then inserts the item at the end of the list.
The operation showSOLL prints the values in the self-organizing linked list in a linked list form.
Test your implementation and compare search, search_mtf and search_t via showSOLL using (1) the test case given in class and (2) your own test cases via showSOLL.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
