Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. Implement the `MinStack` class: `push(val)`, `pop()`, `top()`, `getMin()`.
Dual Stack Tracking
To achieve O(1) for `getMin()`, we maintain a second stack (the 'min stack') alongside the main data stack. Each entry in the min stack stores the minimum value observed in the main stack up to that level. When pushing a new value `v`, the new top of the min stack is `min(v, minStack.top())`. When popping, we pop from both.