Ramp Interview Question

It was a leetcode stack problem