Leetcode 0606. Construct String from Binary Tree

Posted on Mon 28 February 2022 in Leetcode • Tagged with recursion, binary-tree

Question Link : https://leetcode.com/problems/construct-string-from-binary-tree/

Difficulty: Easy

Question

Given the root of a binary tree, construct a string consisting of parenthesis and integers from a binary tree with the preorder traversal way, and return it. Omit all the empty parenthesis pairs that do not affect the one-to-one mapping …


Continue reading