Microsoft interview question

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