Microsoft interview question

hard algorithm questions