Google Interview Question

A coding contest over hackerearth