Microsoft interview question

Problem Solving on Data structure and algorithm