Microsoft Interview Question

This was a coding assessment, so there were questions about data structures and algorithms.