Of the three variations of linked lists (circular, with header and trailer nodes, and doubly linked), which
Question:
Of the three variations of linked lists (circular, with header and trailer nodes, and doubly linked), which would be most appropriate for each of the following applications? 1. You want to search a list for a key and return the keys of the two elements that come before it and the keys of the two elements that come after it. 2. A text file contains integer elements, one per line, sorted from smallest to largest. You must read the values from the file and create a sorted linked list containing the values. 3. A list is short and frequently becomes empty. You want a list that is optimal for inserting an element into the empty list and deleting the last element from the list.
Step by Step Answer:
C++ Plus Data Structures
ISBN: 9781284089189
6th Edition
Authors: Nell Dale, Chip Weems, Tim Richards