Bloomberg interview question

I do not remember them but leetcode medium ish