Pergunta de entrevista da empresa Smoothstack

Easy/Medium leetcode problem for the Coding Challenge.