TikTok interview question

try to implement logistic regression