Google Interview Question

Ques was on strings and it was leetcode hard question.