Statement
You are given a rooted tree with parent of size parent[i] is the parent of node parent[0]
Additionally, you are provided a string s of length s[i] represents the character assigned to node
Your task is to find the length of the longest path in the tree where no two consecutive nodes on the path share the same character. Return the length of this path.
Constraints:
parent.lengths.lengthparent[i]for all parent[0]parentrepresents a valid tree.sconsists of only lowercase English letters.