Bosch Interview Question

leetcode general problems, nothing too hard