TikTok Interview Question

A coding questions and 2 futher questions. 3 basic probability questions.