expand icon
book The Essentials Of Computer Organization And Architecture 4th Edition by Linda Null,Julia Lobur cover

The Essentials Of Computer Organization And Architecture 4th Edition by Linda Null,Julia Lobur

النسخة 4الرقم المعياري الدولي: 978-1284074482
book The Essentials Of Computer Organization And Architecture 4th Edition by Linda Null,Julia Lobur cover

The Essentials Of Computer Organization And Architecture 4th Edition by Linda Null,Julia Lobur

النسخة 4الرقم المعياري الدولي: 978-1284074482
تمرين 3
Suppose you didn't want to maintain a set of sorted data elements as a tree, but chose a linked list implementation instead, despite its obvious inefficiencies. The list is ordered by key values in ascending order; that is, the lowest key value is at the head of the list. To locate a data element, you search the list linearly until you find a key value that is greater than the key value of the item's key. If the purpose of this search is to insert another item in the list, how would you achieve this insertion? In other words, give a pseudocode algorithm that lists each step. You can make this algorithm somewhat more efficient by slightly changing the data structure of the list.
التوضيح
موثّق
like image
like image
close menu
The Essentials Of Computer Organization And Architecture 4th Edition by Linda Null,Julia Lobur
cross icon