码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
m叉树先序和后序所包含的情况
题目描述: We are all familiar with pre-order, in-order and post-order traversals of binary trees. A common problem in data structure classes is to find th...
分类:其他好文   时间:2015-07-05 16:26:26    阅读次数:105
【LeetCode 111】Minimum Depth of Binary Tree
方法1:递归。int minDepth(TreeNode* root) { if (root == NULL) return 0; if (root->left == NULL) { return minDepth(root->right) + 1; }...
分类:其他好文   时间:2015-07-04 23:21:39    阅读次数:143
SQL Server ->> 校检函数CHECKSUM、CHECKSUM_AGG、BINARY_CHECKSUM和HASHBYTES
今天特地查了一下SQL Server下的校检函数有哪些。原本我只是在工作中用过一个CHECKSUM,今天特地学习了一下才发现原来还有其他的校检函数。这里找到了别人对于SQL SERVER下这几个校检函数的学习总结,借此机会学习下别人的学习成果http://bbs.51cto.com/thread-1...
分类:数据库   时间:2015-07-04 19:38:21    阅读次数:209
Path Sum II
Description:Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary t...
分类:其他好文   时间:2015-07-04 18:21:09    阅读次数:91
[Leetcode]-Path Sum
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.For example: Given the below binary tree and sum = 2...
分类:其他好文   时间:2015-07-04 15:32:56    阅读次数:95
Binary search
Binary SearchJonBentley以前说过类似的话:“90%的程序猿无法正确实现二分查找算法就冲着这句话去写binary searchbinary_search 的算法实现部分/*******************************************************...
分类:其他好文   时间:2015-07-04 15:15:53    阅读次数:86
[LeetCode] Binary Tree Zigzag Level Order Traversal
To be honest, I do not know whether this problem is designed to let you use stacks. Anyway, I don't. Here are my codes, both BFS and DFS version. 1 .....
分类:其他好文   时间:2015-07-04 12:27:08    阅读次数:115
Binary String Matching
描述:Given two strings A and B, whose alphabet consist only ‘0’ and ‘1’. Your task is only to tell how many times does A appear as a substring of B? For...
分类:其他好文   时间:2015-07-04 10:57:26    阅读次数:99
[LeetCode] Median of Two Sorted Arrays
This link has a very concise and fast solution based on binary search. Spend some time reading it and make sure you understand it. It is very helpful....
分类:其他好文   时间:2015-07-04 00:41:54    阅读次数:120
Path Sum
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class...
分类:其他好文   时间:2015-07-03 23:31:49    阅读次数:358
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!