TikTok Interview Question

Similar to asteroid collision question in the technical question.