码迷,mamicode.com
首页 >  
搜索关键字:for each    ( 14050个结果
算法——递归篇——树叶下落问题
The Falling Leaves  Each year, fall in the North Central region is accompanied by the brilliant colors of the leaves on the trees, followed quickly by the falling leaves accumulating under the trees....
分类:其他好文   时间:2014-05-22 13:21:30    阅读次数:286
POJ 3614 Sunscreen
Sunscreen Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 3317   Accepted: 1171 Description To avoid unsightly burns while tanning, each of the C (1 ≤ C ≤ 25...
分类:其他好文   时间:2014-05-22 12:10:39    阅读次数:261
leetcode Populating Next Right Pointers in Each Node
/**根据完美二叉树或者非完美二叉树都可以,利用左右子树的根节点的next节点信息来连接next*/public void connect(TreeLinkNode root){ if(root==null) return; //利用父节点的next...
分类:其他好文   时间:2014-05-22 03:03:39    阅读次数:183
【LeetCode】Evaluate Reverse Polish Notation
Evaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integer or another express...
分类:其他好文   时间:2014-05-22 00:49:57    阅读次数:311
【leetcode】Remove Duplicates from Sorted Array
Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space for a...
分类:其他好文   时间:2014-05-21 20:00:51    阅读次数:296
LeetCode: Combination Sum II [039]
【题目】 Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. Each number in C may only be used once in the combination. Note: All numbers (including target) will be ...
分类:其他好文   时间:2014-05-21 15:55:25    阅读次数:259
leetcode -day20 Add Two Numbers
1、 ?? Add Two Numbers  You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two num...
分类:其他好文   时间:2014-05-21 10:49:10    阅读次数:221
LeetCode: Trapping Rain Water [041]
【题目】 Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. For example, Given [0,1,0,2,1,0,1,3,2,1,2,1], return 6. The above elevation map is represente...
分类:移动开发   时间:2014-05-21 06:44:38    阅读次数:359
【Leetcode】Jump Game
Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximu...
分类:其他好文   时间:2014-05-21 04:39:53    阅读次数:332
poj 1330 Nearest Common Ancestors
DescriptionA rooted tree is a well-known data structure in computer science and engineering. An example is shown below:In the figure, each node is lab...
分类:其他好文   时间:2014-05-21 03:23:51    阅读次数:296
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!