TikTok interview question

Implement a popular model layer from scratch.