Microsoft interview question

Not disclosable unfortunately, but leetcode medium