Pergunta de entrevista da empresa C3 AI

There were some algorithm exercises, the hard part is considering edge cases