IBM Interview Question

Online medium-level leetcode problem and an sql problem.