Search
⌘K
Get Premium
Leetcode 331. Verify Preorder Serialization of a Binary Tree
Given a comma-separated preorder string using '#' for nulls, determine whether it represents a valid binary-tree preorder serialization without reconstructing the tree. The core challenge is to verify the sequence satisfies binary node degree constraints (or equivalently can be reduced by repeatedly collapsing "node,#,#" patterns).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.