问题:输出二叉树的每一行的结点,从叶子到根/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(i...
分类:
其他好文 时间:
2014-08-06 22:04:02
阅读次数:
185
问题:根节点到叶子结点的所有权值和分析:从根节点遍历,若遍历到叶子结点,则sum+其路径的所有权值和/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * Tree...
分类:
其他好文 时间:
2014-08-06 21:59:32
阅读次数:
184
问题:删除距离末尾n个距离的结点分析:先找出距离末尾n个距离的结点其距离开始的距离多少,然后再删除/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ...
分类:
其他好文 时间:
2014-08-06 21:58:02
阅读次数:
199
http://msdn.microsoft.com/en-us/library/hh156548(v=vs.110).aspxThe .NET Framework provides several ways for you to use multiple threads of execution t...
分类:
Web程序 时间:
2014-08-06 18:44:02
阅读次数:
364
1001:Inversion
模版题,求逆序数对。有多少逆序数对,就可以剪掉多少。
1003:Least common multiple
对于每一个子集,lcm为2的a的最大值次方*3的b的最大值次方。
所以我们只需要求出以某个b为b的最大值的时候,a的最大值的分布情况即可。
我们先把b从小到大排序。
对于某一个b,我门只需要求出之前出现过的a比当前a小的数量为x;
那么就可知对于这...
分类:
其他好文 时间:
2014-08-06 14:57:51
阅读次数:
214
Using() Statement in 3 seconds and a bug in Reflector The boring, known accross the board definition from the MSDN site: Defines a scope, outside of w...
分类:
其他好文 时间:
2014-08-06 14:39:21
阅读次数:
234
Isolated bags used for various purposes, some of which are described below. In addition to their main object is also popular as promotional items. Bag...
分类:
其他好文 时间:
2014-08-06 11:40:51
阅读次数:
402
这是个很普通的 file 上传组件,multiple 是支持多选,当然 IE6-9 是不支持的,所以先不论他们了。file对象 是一个非常好用的东西,可以获取到文件的 文件名,文件大小,文件类型,最后一次修改日期。用起来也很简单,来看个小例子: file 不出意外的话,你可以在控制台看到...
分类:
Web程序 时间:
2014-08-06 01:37:20
阅读次数:
273
错误代码如下:
E:\>wsimport -keep service.xml
parsing WSDL...
[WARNING] src-resolve: Cannot resolve the name 'soapenc:Array' to a(n) 'type definition' component.
line 505 of file:/E:/service1.xml#types...
分类:
Web程序 时间:
2014-08-05 19:27:20
阅读次数:
242
转至:https://github.com/CSSLint/csslint/wiki/Bulletproof-font-faceWhen using @font-face to declare multiple font types for cross browser compatibility, ...
分类:
Web程序 时间:
2014-08-05 10:49:39
阅读次数:
700