Binary Tree Inorder Traversal 描述 分析 栈 Morris中序遍历 相关题目 Binary Tree Inorder Traversal 描述 Given a binary tree, return the inorder traversal of its nodes' values. For exam...
Binary Tree Postorder Traversal 描述 分析 栈 Morris后序遍历 相关题目 Binary Tree Postorder Traversal 描述 Given a binary tree, return the postorder traversal of its nodes' values. Fo...
Binary Tree Inorder Traversal Question Problem Statement Example Challenge 題解1 - 遞迴版 Python Python - with helper C++ Java 源碼分析 複雜度分析 題解2 - 迭代版 Python C++ Java 源碼分析 ...
Recover Binary Search Tree Recover Binary Search Tree Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing its structure. Note...
Minimum Depth of Binary Tree Minimum Depth of Binary Tree Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from th...
Maximum Depth of Binary Tree Maximum Depth of Binary Tree Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the...
Validate Binary Search Tree Validate Binary Search Tree Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The le...
Binary Tree Upside Down Binary Tree Upside Down Given a binary tree where all the right nodes are either leaf nodes with a sibling (a left node that shares the same parent node...