TikTok interview question

The first leet-code is BFS