Google interview question

String parsing leetcode easy, asked about big O