Driver for self-organizing search .Write a driver program for self-organizing search implementations (see Exercise 3.1.22) that uses put() to fill a symbol table with N keys, then does 10N successful searches according to a predefined probability distribution. Use this driver to compare the running time of your implementation from Exercise 3.1.22 with Binary Search ST for N = 103, 104, 105, and 106 using the probability distribution where search hits the ith smallest key with probability 1/2 i .
Self-organizing search. A self-organizing search algorithm is one that rearranges items to make those that are accessed frequently likely to be found early in the search. Modify your search implementation for Exercise 3.1.2 to perform the following action on every search hit: move the key-value pair found to the beginning of the list, moving all pairs between the beginning of the list and the vacated position to the right one position. This procedure is called the move-to-front heuristic.
Develop a symbol-table implementation Array ST that uses an (unordered) array as the underlying data structure to implement our basic symbol-table API.