Pergunta de entrevista da empresa C3 AI

Leetcode question and high level system design.