Microsoft interview question

Implement an API which supports stack-like API + get max, i.e: * top() * pop() *push(elem) * get_max()

Interview Answer

Anonymous

Aug 25, 2022

Solution includes 2 stacks (1 regular and one stack of maximums)

3