Microsoft interview question

Hard dsa questions one on one coding