Aurora Innovation interview question

Standard leetcode question with big O after