Indexed List: (25pt) As presented, link-based lists must be searched sequentially. For large lists, this can result in p

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Indexed List: (25pt) As presented, link-based lists must be searched sequentially. For large lists, this can result in p

Post by answerhappygod »

Indexed List 25pt As Presented Link Based Lists Must Be Searched Sequentially For Large Lists This Can Result In P 1
Indexed List 25pt As Presented Link Based Lists Must Be Searched Sequentially For Large Lists This Can Result In P 1 (93.58 KiB) Viewed 15 times
Indexed List: (25pt) As presented, link-based lists must be searched sequentially. For large lists, this can result in poor performance. A common technique for improving list searching performance is to create and maintain an index to the list. An index is a set of pointers to various key places in the list. For example, an application that searches a large list of names could improve performance by creating an index with 26 entries - one for each letter of the alphabet. A search operation for a name beginning with “K” would first search the index to determine where the "K" entries begin and “jump into the list at that point and search linearly until the desired name was found. This can be much faster than searching the linked list from the beginning. Using the provided source file, create an IndexedList class that holds names and an index of 26 entries as the above example. This class provides the following member functions: 3.1. insertinIndexedList: insert the provided name at front of all names with the same index For example: • If your current list is: Bobby -> Joe -> James -> Kevin -> Katherine -> Stacy -> null • After inserting Kalvin, your list should be: Bobby -> Joe -> James -> Kalvin -> Kevin -> Katherine -> Stacy -> null 3.2. 3.3. 3.4. searchinIndexed List deleteFromIndexed List operator<< to output data per index.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply