Subtrees With Same Node Value Problem
Published in
Nov 11, 2023
Given the root of a binary tree, return the count all subtrees in it such that every node in the subtree has the same value.
Input:
Output: 6
Explanation: Six subtrees have the same data, as shown below:
Practice link: https://www.techiedelight.com/?problem=SubtreesWithSameNodeValue