Loading...
The Min Tracker
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
- Seniority
- mid, senior
Problem
A monitoring system needs a stack that retrieves the minimum element in constant time without scanning the whole stack. Implement a stack class with push, pop, and get_min methods, all operating in O(1) time.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.