Google Interview Question

They asked a Leetocode easy/medium problem.