Pocket Gems interview question

Strstr, Construct tenary tree