Python implementation of a Queue that supports find_min() alongwith usual queue operations.
The time and space complexities of find_min() are as follows:
- O(1) Time
- O(1) Space (For Integers), O(n) Space (Generalized) [n = size of stack]
Enqueue, Deque are O(1) time as usual.
Came across a problem while solving a Competitive Programming question and came to know about this particular data structure.
For details regarding implementation, and how it works, please check the following links: