max-depth-nary-leaf-guard

Status: IN

The `if not root.children: return 1` check prevents `ValueError` from calling `max()` on an empty generator; removing it breaks leaf nodes.

Source: entries/2026/06/06/maximum-depth-of-n-ary-tree-solution.md

JSON