Answer:
A stack data structure should be used. The time complexity of the insert, delete minimum and maximum operation is O(1).
Step-by-step explanation:
The stack data structure is an indexed structure that holds data in an easily retrievable way. Data is held in a first-in last-out method as elements in the structure are popped out from the end of the stack when retrieved sequentially.
The worst-case time complexity of getting the minimum and maximum elements in a stack and deleting it is O(1), this is also true for inserting elements in the stack data structure.