Anyone has seen this question anywhere and possible solution?
https://leetcode.com/discuss/interview-question/1081320/Microsoft-virtual-onsite-question