The worst case running time of a linear search on the self-organizing list is………
a) O(1)
b) O(logn)
c) O(n)
d) O(n2)
Explanation: Worst case occurs when the element is located at the very end of list. So n comparisons must be made to the locate element. So the worst case running time of linear search on self-organizing list is O(n).
Which of the following data structure is preferred to have lesser search time when the list size is small?
a) search tree
b) sorted list
c) self-organizing list
d) linked list
Explanation: Self-organizing list is easy and simple to implement than search tree and it requires no additional space. So using self-organizing list is preferred when list size is small.
In……… method, whenever a node is accessed, it might move to the head of the list if its number of accesses becomes greater than the records preceding it.
a) least recently used
b) count
c) transpose
d) exchange
Explanation: In the count method, the number of times a node was accessed is counted and is stored in a counter variable associated with each node. Then the nodes are arranged in descending order based on their access counts. And the node with highest access count is head of the list.
Symbol tables during compilation of program is efficiently
implemented using __________
a) a singly linked list
b) a doubly linked list
c) a self-organizing list
d) an array
Explanation: Self organizing list allows fast sequential search and it is simple to implement and requires no extra storage. Self-organizing list is used to implement the symbol table.
Which of the following method performs poorly when elements are accessed in sequential order?
a) count method
b) move to front method
c) transpose meth
d) ordering method
Explanation: Move-to-front method performs poorly when the elements are accessed in sequential order, especially if that sequential order is then repeated multiple times.
The self-organizing list improves………
a) average access time
b) insertion
c) deletion
d) binary search
Explanation: The self-organizing list rearranges the nodes based on the access probabilities of the nodes. So the required elements can be located efficiently. Therefore, self-organizing list is mainly used to improve the average access time.