Microsoft Interview Question

engage question in round1 and 2