Domanda di colloquio di Aurora Innovation

Standard leetcode question with big O after