Quick Overview

Sum all numbers formed by root-to-leaf digit paths in a binary tree represented as a heap array. Carry each decimal prefix through the traversal, add only at leaves, and analyze recursive versus iterative space.

Sum Numbers Formed by Root-to-Leaf Paths

Company: Meta

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Onsite

Overview: Sum all numbers formed by root-to-leaf digit paths in a binary tree represented as a heap array. Carry each decimal prefix through the traversal, add only at leaves, and analyze recursive versus iterative space.

Read the full Meta Software Engineer interview experience this question came from

Loading…