Pergunta de entrevista da empresa Google

some algorithm problems (leetcode medium)