Microsoft Interview Question

Easy to meduim algorithm questions.