Toptal interview question

Medium difficulty algo questions. Two string parsing and one tree question