Daily challenge for 2026-02-06
402. Count Leaf Nodes
Given a representation of a binary tree as a list where each element is a list [value, left_child, right_child], count the number of leaf nodes. A leaf node is a node that has no children (both left_child and right_child are null).
Example:Input: tree = [1, [2, null, null], [3, null, null]]Output: 2
Run this challenge interactively in Python or JavaScript when the app loads.