Pregunta de entrevista de Aurora Innovation

Standard leetcode question with big O after