Microsoft interview question

4 leet code type questions were asked.