• 1. Give at least one example of applications where each of the following data structures would be most suitable:

    • a) Arrays
    • b) Queues
    • c) Linked lists
    • d) Stacks
    • e) Trees
  • 2. As stated in the text, a priority queue is a queue in which certain items are allowed to jump to the head of the line if they meet certain conditions. Devise a data structure and a suitable algorithm to implement a priority queue.

  • ◆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 ...

Get The Essentials of Computer Organization and Architecture, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.