Dropbox interview question

One similar to OA, another leetcode medium.