I would store two fields minIndex and maxIndex that will store index positions in your data structure for the minimum and maximum value respectively.
When new elements are added to the queue, check for two things:
- The element is less than the current minimum element at the minIndex position; if so update the value of minIndex after insertion.
- The element is greater than the current maximum element at the maxIndex position and update the reference accordingly.
This will give you a O(1) asymptote for the current min and max value.