NeetCode #418LC-606MediumTrees
← Back to All Problems#418 · #606 · Construct String from Binary Tree(根据二叉树创建字符串)
📌 Problem Statement & Constraints
Given the root of a binary tree, construct a string of parentheses and integers from a pre-order traversal: an empty tree is
"", a node is value(child), and omitted children are represented by omitting the parentheses. Constraints: the number of nodes is in [1, 10^4], -1000 <= Node.val <= 1000.🔒
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!