IBM interview question

Just regular leetcode-style timed questions.