Moesif interview question

Design a Maxstack in Javascript