递归
文章平均质量分 81
哎-哭泣的鱼
这个作者很懒,什么都没留下…
展开
-
【LeetCode】Populating Next Right Pointers in Each Node I & II
Populating Next Right Pointers in Each Node Total Accepted: 6122 Total Submissions: 17900 My SubmissionsGiven a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode原创 2014-01-16 13:24:35 · 938 阅读 · 0 评论 -
【LeetCode】Unique Binary Search Trees I && II
1、Unique Binary Search Trees Total Accepted: 11405 Total Submissions: 32197 My SubmissionsGiven n, how many structurally unique BST's (binary search trees) that store values 1...n?For example,原创 2014-04-08 10:16:55 · 770 阅读 · 0 评论 -
【LeetCode】根据前序和中序遍历建树 && 根据中序遍历和后续遍历建树
1、Construct Binary Tree from Preorder and Inorder Traversal Total Accepted: 7041 Total Submissions: 27696 My SubmissionsGiven preorder and inorder traversal of a tree, construct the binary tree.原创 2014-04-09 11:19:17 · 2867 阅读 · 0 评论 -
【九度】题目1044:Pre-Post
题目1044:Pre-Post时间限制:1 秒内存限制:32 兆特殊判题:否提交:502解决:291题目描述: We are all familiar with pre-order, in-order and post-order traversals of binary trees. A common problem in data structure classes is t原创 2014-03-20 18:11:33 · 2768 阅读 · 0 评论 -
【LeetCode】Decode Ways
Decode Ways Total Accepted: 7450 Total Submissions: 47786 My SubmissionsA message containing letters from A-Z is being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z'原创 2014-04-13 23:32:25 · 936 阅读 · 0 评论 -
【LeetCode】Sudoku Solver
Sudoku Solver Total Accepted: 20609 Total Submissions: 96910 My Submissions Question Solution Write a program to solve a Sudoku puzzle by filling the empty cells.Empty cells are indicated by the原创 2015-02-04 22:54:52 · 820 阅读 · 0 评论 -
【LeetCode】357. Count Numbers with Unique Digits
357. Count Numbers with Unique Digits My Submissions QuestionEditorial SolutionTotal Accepted: 1190 Total Submissions: 2830 Difficulty: MediumGiven a non-negative integer n, count all numbers with原创 2016-06-14 14:19:59 · 832 阅读 · 0 评论