Google Interview Question

To read the code and explain