TikTok interview question

One round was a string simulation problem, and the other round involved data structures, specifically a heap and a binary search.