IBM interview question

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