TikTok interview question

basic ML questions, leetcode medium/hard