TikTok interview question

A hard coding question that has to do with data structures