Bloomberg interview question

Leetcode mediums and one hard