Find the longest path with different adjacent characters in a tree.
Unlock detailed company stats for this questionUpgrade
Given a tree (as a parent array) where each node has a character label, return the length of the longest path such that no two adjacent nodes have the same character.
Community answers
No answers contributed by the community yet.


