Solution: Longest Path With Different Adjacent Characters
Solution: Longest Path With Different Adjacent Characters asks you to find the longest path in a rooted tree where neighboring nodes have different characters, then return its length.
We'll cover the following...
We'll cover the following...
Statement
You are given a rooted tree with parent of size parent[i] is the parent of node