Yext Interview Question

string manipulation, cousins of binary tree