Tyemill interview question

Easy leetcode question + design question