TikTok Interview Question

Hackerrank questions. 2 hours for what was (probably) 5 leetcode medium questions.