โ† Media.net questions
CodingMedium

Count uni-valued subtrees

Filed under Media.net

The question

Given a binary tree, count the total number of subtrees where all nodes in the subtree have the same value.

No write-up yet. Related questions below have one.

Related Media.net questions

Collected from public candidate posts and coding forums. Updated Nov 2026.