Ciena Interview Question

Tree and string manipulation