GlobalLogic Interview Question

it was easy