Microsoft interview question

How to solve a data structure error