Microsoft interview question

lookup leet code question 359