Longest Path With Different Adjacent Characters
Explore how to find the longest path in a rooted tree where no two consecutive nodes share the same character. Understand tree representation with parent arrays and strings, and develop an approach to solve this using topological sorting concepts.
We'll cover the following...
We'll cover the following...
Statement
You are given a rooted tree with