Pergunta de entrevista da empresa IBM

Just standard leetcode problems, easy difficulty.