Pergunta de entrevista da empresa Microsoft

I was asked medium Leetcode algorithms