Microsoft interview question

LC easy and LC medium