NeetCode #439LC-662MediumTrees
← Back to All Problems

#439 · #662 · Maximum Width of Binary Tree(二叉树最大宽度)

📌 Problem Statement & Constraints

Given the root of a binary tree, return the maximum width of the tree: the maximum number of nodes between the leftmost and rightmost non-null nodes of any level, counting the nulls in between as if the tree were a complete tree. Constraints: the number of nodes is in [1, 3000], -100 <= Node.val <= 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!