Problem 2791 · Hard

Count Paths That Can Form a Palindrome in a Tree

A string can be rearranged into a palindrome when at most one letter has an odd count, so each tree path is checked by its letter parities.

Open the interactive visualisation