Daily challenge for 2026-02-11
407. Simple Tree Node Value Sum
Given the root of a binary tree, return the sum of the values of all its nodes. Assume the tree nodes have an integer attribute val.
Example:
Input: root = [1, 2, 3]
Output: 6 (1 + 2 + 3)
Run this challenge interactively in Python or JavaScript when the app loads.