TikTok Interview Question

Strings converted into binary trees.