Microsoft Interview Question

Find the most optimal way to solve x problem.