Pergunta de entrevista da empresa Plivo

Stack-based medium problem was asked.