Skip to content

Commit f55925b

Browse files
authored
Update Construct_Binary_Tree_from_Preorder_and_Inorder_Traversal.cpp
Question description added
1 parent 8f6b5cc commit f55925b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Data Structures/Trees/Construct_Binary_Tree_from_Preorder_and_Inorder_Traversal.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Leetcode problem for Binary Tree
2+
// 105. Construct Binary Tree from Preorder and Inorder Traversal
3+
4+
// Given two integer arrays preorder and inorder where preorder is the preorder traversal of a binary tree and inorder is the inorder traversal of the same tree, construct and return the binary tree.
5+
6+
// Example 1:
7+
8+
// Input: preorder = [3,9,20,15,7], inorder = [9,3,15,20,7]
9+
// Output: [3,9,20,null,null,15,7]
10+
// Example 2:
11+
12+
// Input: preorder = [-1], inorder = [-1]
13+
// Output: [-1]
14+
----------------------------------------------------------------------------
115
/**
216
* Definition for a binary tree node.
317
* struct TreeNode {

0 commit comments

Comments
 (0)