Tree
WX_ming
写代码就像写作文一样,思路要明确,方法要对,否则又臭又长还出错
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
LeetCode 889. Construct Binary Tree from Preorder and Postorder Traversal C++ [自己开发的博客网站,欢迎访问](www.
889. Construct Binary Tree from Preorder and Postorder Traversal Return any binary tree that matches the given preorder and postorder traversals. Values in the traversals pre and post are distinct p...原创 2018-08-22 20:24:40 · 526 阅读 · 0 评论 -
[WXM] LeetCode 894. All Possible Full Binary Trees C++
894. All Possible Full Binary Trees A full binary tree is a binary tree where each node has exactly 0 or 2 children. Return a list of all possible full binary trees with N nodes. Each element of th...原创 2018-09-01 17:32:22 · 480 阅读 · 0 评论 -
[WXM] LeetCode 834. Sum of Distances in Tree C++
834. Sum of Distances in Tree An undirected, connected tree with N nodes labelled 0…N-1 and N-1 edges are given. The ith edge connects nodes edges[i][0] and edges[i][1] together. Return a list ans,...原创 2018-09-01 22:21:05 · 533 阅读 · 0 评论 -
[WXM] LeetCode 99. Recover Binary Search Tree C++
99. Recover Binary Search Tree Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing its structure. Example 1: Input: [1,3,null,null,2] 1 / ...原创 2018-09-02 11:26:41 · 260 阅读 · 0 评论 -
Leetcode 173. Binary Search Tree Iterator
173. Binary Search Tree Iterator Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. Calling next() will return the next smallest numb...原创 2019-02-02 09:54:23 · 235 阅读 · 0 评论
分享