Implement a queue with amortized O(1) complexity for push/pop/getMin/getMax operations.