IBM Interview Question

first question was a relatively easy leetcode medium. Second was a SQL question which was also simple