Genpact Interview Question

was not that difficult.