Microsoft Interview Question

it was an easy problem solving question