leetle

Daily challenge for 2026-04-22

477. Sum of Left Children in Complete Tree

Given an array tree representing a complete binary tree in level-order traversal, return the sum of all nodes that are left children. In a 0-indexed array, the left child of a node at index i is located at index 2 * i + 1.

Example:
Input: tree = [1, 2, 3, 4, 5]
Output: 6

Run this challenge interactively in Python or JavaScript when the app loads.