Google Interview Question

Code assigment on site and some technical logics