How to Count Univalue Subtrees in a Binary Tree? April 27, 2019 algorithms, c / c++, data structure, DFS, java No Comments Given a binary tree, count the number of uni-value subtrees. A Uni-value subtree means all nodes of the subtree have the same value. Example : Input: root = 5 … [Continue Reading...]