Google interview question

Leetcode medium problem on stacks