Mphasis Interview Question

it was simple only for me