Cruise Interview Question

build n-ary tree from input strings