ByteDance interview question

One Leetcode python question, One SQL question. Neither question is hard.