TikTok interview question

Binary search tree for cousins