TikTok interview question

basic algos and general ml