Can you design a data structure just like a queue which contains 'enqueue', 'dequeue' 'minimum' and 'maximum'? I know a method to make a queue using 2 stacks to find the minimum and maximums respectively, but how can I get both simultaneously?
Thanks