← Back to companies
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/$
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. Implement the MinStack class with O(1) time complexity for each function.