Google Interview Question

Simple code with strings