Google Interview Question

String parsing leetcode easy, asked about big O