Tree: Depth-First Search - Sum Root to Leaf Numbers
Suppose the problem is extended so that node values are real numbers (floats) instead of integers, and the goal remains to sum all root-to-leaf numbers formed by concatenation (e.g., 1.2 concatenated with 3.4 becomes 1.23.4). Which approach is best suited to solve this variant?
