Pergunta de entrevista da empresa IBM

one leetcode hard question and one easy