For each algorithm, always explain how and why theywork. If not by a proof, at least by a clear explanation.ALWAYS, analyze the running time complexity of youralgorithms. Do not write a program. Write pseudo codes or explainin words
Q2: Give a data structure that implements a Min-Heap and thecommand Max(S) that returns the maximum in the heap. Try and makethe last operation as fast as possible.
Q3: (a)Show how to implement a Queue by a Priority Queue. Whatis the run time per operation?
(b) Show how to implement a Stack using Priority Queue. What isthe run time per operation?