TikTok interview question

A medium difficulty coding problem