Skip to content

Commit 0375a95

Browse files
authored
Update ConstructBinaryTreePreorderInorder.swift
1 parent a04c0c2 commit 0375a95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Tree/ConstructBinaryTreePreorderInorder.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Question Link: https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/
33
* Primary idea: Always use the first element in preorder as root,
44
* then find that one in inorder to get left and right subtrees
5-
* Time Complexity: O(n), Space Complexity: O(n)
5+
* Time Complexity: O(nlogn), Space Complexity: O(1)
66
*
77
* Definition for a binary tree node.
88
* public class TreeNode {

0 commit comments

Comments
 (0)