Design Circular Queue
Design a circular queue with fixed size that supports enqueue, dequeue, front, rear, isEmpty, and isFull operations.
Find Median from Data Stream
Design data structure to find median from continuous stream of integers
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
Min Stack
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time