Implement Queue
Implement a queue using arrays or linked lists with O(1) time complexity for all operations.
Implement Queue using Stacks
Implement a queue using two stacks with O(1) amortized time complexity for all operations.
Implement Stack
Design and implement a stack data structure with push, pop, top, and empty operations
Implement Stack using Queues
Implement a stack using two queues with O(1) amortized time complexity for all operations.
Max Stack
Design a stack that supports push, pop, top, peekMax, and popMax operations