TikTok Interview Question

HackerRank OA that was broken.