Symbol table with random access. Create a data type that supports inserting a key-value pair, searching for a key and returning the associated value, and deleting and returning a random key. Hint : Combine a symbol table and a randomized queue (see exercise1.3.35).
Exercise 1.3.35:
Random queue.A random queuestores a collection of items and supports the following API:
Write a class RandomQueue that implements this API. Hint: Use an array representation
(with resizing). To remove an item, swap one at a random position (indexed 0 through N-1) with the one at the last position (index N-1). Then delete and return the last object, as in ResizingArrayStack. Write a client that deals bridge hands (13 cards each) using RandomQueue.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.