Pergunta de entrevista da empresa Uber

Will not disclose, but common leetcode