String anagram testing, Computation of diameter in binary tree.