Problem 250 · Medium
Count subtrees where all nodes have the same value using DFS.
Open the interactive visualisation