Microsoft Interview Question

2 technical and a couple design questions.