Tessell Interview Question

A question based on Trees and String