- 博客(7)
- 资源 (1)
- 收藏
- 关注
原创 LeetCode-235. Lowest Common Ancestor of a Binary Search Tree
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined between ...
2018-07-28 16:07:01 114
原创 LeetCode-113. Path Sum II
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. Note: A leaf is a node with no children. Example: Given the below binary tree and sum = 22, ...
2018-07-28 14:41:34 126
原创 LeetCode-404. Sum of Left Leaves
Find the sum of all left leaves in a given binary tree. Example: 3 / \ 9 20 / \ 15 7 There are two left leaves in the binary tree, with values 9 and 15 respectively. Return 24....
2018-07-28 11:27:45 142
原创 LeetCode-104. Maximum Depth of Binary Tree
104. 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 root node down to the farthest leaf node. Not...
2018-07-18 16:16:12 138
原创 LeetCode-101. Symmetric Tree
101. Symmetric Tree Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree [1,2,2,3,4,4,3] is symmetric: 1 / \ 2 ...
2018-07-18 16:04:43 131
原创 LeetCode-100. Same Tree
100. Same Tree Given 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 sa...
2018-07-18 15:57:57 96
原创 LeetCode-94. Binary Tree Inorder Traversal
94. Binary Tree Inorder Traversal Given a binary tree, return the inorder traversal of its nodes' values. Example: Input: [1,null,2,3] 1 \ 2 / 3 Output: [1,3,2] 二叉树的中序遍历,我用的C+...
2018-07-18 15:51:39 147
数据结构题集答案全解-严蔚敏(C语言版)
2017-04-20
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人