Pergunta de entrevista da empresa Microsoft

1st round was tricky based on DP