Find Root Node in Colored Tree with Pattern Constraints | Hello Interview