TikTok Interview Question

2 Leetcode style programming problems