longest common ancestor
detecting cycles
string permutations