NeetCode #405LC-366MediumTreesNC Algo100
← Back to All Problems

#405 · #366 · Find Leaves of Binary Tree(寻找二叉树的叶子节点)

📌 Problem Statement & Constraints

Given the root of a binary tree, collect all its nodes level by level from the leaves upward: first all leaves are removed, then the new leaves, and so on. Return the list of levels. Constraints: the number of nodes is in [1, 100].
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!