码迷,mamicode.com
首页 >  
搜索关键字:each    ( 14050个结果
LeetCode: Path Sum II [113]
【题目】 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 tree and sum = 22, 5 / 4 8 / / 11 13 4 ...
分类:其他好文   时间:2014-06-20 10:53:08    阅读次数:181
LeetCode: Populating Next Right Pointers in Each Node [116]
【题目】 Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; } Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be...
分类:其他好文   时间:2014-06-07 14:28:36    阅读次数:215
Path Sum II
题目 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 tree and sum = 22, 5 ...
分类:其他好文   时间:2014-06-07 13:47:22    阅读次数:191
projecteuler---->problem=21----Amicable numbers
Let d(n) be defined as the sum of proper divisors of n (numbers less than n which divide evenly into n). If d(a) = b and d(b) = a, where a b, then a and b are an amicable pair and each of a and b...
分类:其他好文   时间:2014-06-07 13:40:53    阅读次数:226
ZOJ 3789 Gears
并查集, 删除节点操作,可以用新建节点代替 维护每个点到跟节点的距离 Gears Time Limit: 2 Seconds      Memory Limit: 65536 KB Bob has N (1 ≤ N ≤ 2*105) gears (numbered from 1 to N). Each gear can rotate clockwise or co...
分类:其他好文   时间:2014-06-07 11:33:37    阅读次数:227
jquery获取checkbox被选中的值
只用一个循环,就可以找出被选中的checkbox的值 var s; $("[name = b]:checkbox").each(function () { if (this.checked) { s += $(this).val() + "|"; } });alert(s); 这样就可以了
分类:Web程序   时间:2014-06-06 07:27:29    阅读次数:286
leetcode--Remove Duplicates from Sorted List
Given a sorted linked list, delete all duplicates such that each element appear onlyonce.For example,Given1->1->2, return1->2.Given1->1->2->3->3, retu...
分类:其他好文   时间:2014-06-06 07:00:36    阅读次数:269
LeetCode:Remove Duplicates from Sorted Array && Remove Element
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for...
分类:其他好文   时间:2014-06-06 06:53:19    阅读次数:347
leetcode--Populating Next Right Pointers in Each Node
Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next pointe...
分类:其他好文   时间:2014-06-05 13:42:24    阅读次数:264
leetcode--Populating Next Right Pointers in Each Node II
Follow up for problem "Populating Next Right Pointers in Each Node".What if the given tree could be any binary tree? Would your previous solution stil...
分类:其他好文   时间:2014-06-05 13:26:37    阅读次数:335
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!