Google interview question

Not applicable, but just study leetcode.