Propose two ways which make the running/practical time faster while guranteering the deleteMin() operation in O(1) time, and explain why/how your choices would work faster than the sorted insertion.
Write three sentences for each alternative way (REQUIRED).
Your explanation has to be as specific as possible.
As a hint, you can say something like "Instead of Java LinkedList for the storage, use XXX instead because YYYYYYYYYY".
• 'Keeping only the top/minimum N elements' is NOT an option for your answer. The MinPQ has to accommodate and keep ALL elements inserted.
• The storage has to be a (physically) linear/one-dimensional structure (such as array, list; including some Java container classes); it cannot be a physically non-linear structure such as tree, table or graph.
This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.Answer:
1. First solution:
a. We insert all items into an arraylist using add method. This method will put the new item to the end of the arraylist
b. After reading the file, we start to sort the arraylist using mergesort or quicksort. We will sort the items in descending order....