Microsoft Interview Question

Typical programming questions, (math-oriented).