LeetCode: 99 Recover Binary Search Tree

Problem DescriptionTwo elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Example 1Input: [1,3,null,null,2] 1 / 3 \ 2 Output: [3,1,null

- Expand -

LeetCode: 100 Same Tree

Problem DescriptionGiven two binary trees, write a function to check if they are the same or not.Two binary trees are considered the same if they are structurally identical and the nodes have the same

- Expand -

LeetCode: 96 Unique Binary Search Trees

Problem DescriptionGiven n, how many structurally unique BST's (binary search trees) that store values 1 ... n?ExampleInput: 3 Output: 5 Explanation: Given n = 3, there are a total of 5 unique BST's:

- Expand -

LeetCode: 94 Binary Tree Inorder Traversal

0094 Binary Tree Inorder TraversalProblem DescriptionGiven a binary tree, return the inorder traversal of its nodes' values.ExampleInput: [1,null,2,3] 1 \ 2 / 3 Output: [1,3,2]SolutionPlease refer th

- Expand -

LeetCode: Binary Search Tree

IntroductionIn computer science, a binary search tree (BST), also called an ordered or sorted binary tree, is a rooted binary tree whose internal nodes each store a key greater than all the keys in th

- Expand -

LeetCode: 97 Interleaving String

0097 Interleaving StringProblem DescriptionGiven s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.Example 1:Input: s1 = "aabcc", s2 = "dbbca", s3 = "aadbbcbcac" Output: trueExamp

- Expand -