- 博客(3)
- 收藏
- 关注
原创 (Leetcode)利用preorder-inorder/postorder-inorder构建二叉树
105. Construct Binary Tree from Preorder and Inorder Traversal Given preorder and inorder traversal of a tree, construct the binary tree.分析 根据preorder获得root节点(preorder第1个node),通过root在inorder中的位
2016-10-22 01:53:07 1117
原创 (Leetcode)Unique Binary Search Trees I & II
96. Unique Binary Search TreesGiven n, how many structurally unique BST's (binary search trees) that store values 1...n?For example,Given n = 3, there are a total of 5 unique BST's. 1 3
2016-10-20 16:52:58 368
原创 (Leetcode)92. Reverse Linked List II ——反转单链表
92. Reverse Linked List IIReverse a linked list from position m to n. Do it in-place and in one-pass.For example:Given 1->2->3->4->5->NULL, m = 2 and n = 4,return 1->4->3->2->5->NULL.Note:Given m, n
2016-10-09 20:52:18 308
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人