Skip to main content
105. Construct Binary Tree from Preorder and Inorder Traversal

105. Construct Binary Tree from Preorder and Inorder Traversal

題目 連結

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.


LZXAbout 1 minLeetCodeMediumHashMapTree
d99. Recover Binary Search Tree

d99. Recover Binary Search Tree

題目 連結

You are given the root of a binary search tree (BST), where the values of exactly two nodes of the tree were swapped by mistake. Recover the tree without changing its structure.


LZXAbout 1 minLeetCodeMediumTree