CarGurus interview question

Medium task form leetcode (implement min stack)