Google interview question

DSA questions about trees, and another for strings.