Smoothstack Interview Question

Easy/Medium leetcode problem for the Coding Challenge.