Google Interview Question

Only algorithm problems are involved