Pergunta de entrevista da empresa Microsoft

Various algorithmic problems. Nothing unexpected.