Microsoft Interview Question

To answer a coding challenge