TikTok interview question

Leetcode qn: Freqstack (medium difficulty)