Microsoft interview question

technical question and a little bit behavioral question