码迷,mamicode.com
首页 >  
搜索关键字:each    ( 14050个结果
LeetCode: Copy List with Random Pointer
LeetCode: Copy List with Random PointerA linked list is given such that each node contains an additional random pointer which could point to any node ...
分类:其他好文   时间:2014-08-23 12:34:30    阅读次数:193
poj3061 Subsequence ,尺取法
A sequence of N positive integers (10 < N < 100 000), each of them less than or equal 10000, and a positive integer S (S < 100 000 000) are given. Write a program to find the minimal length of the sub...
分类:其他好文   时间:2014-08-23 11:22:40    阅读次数:198
Leetcode - candy
被第二个条件给坑了 You are giving candies to these children subjected to the following requirements: Each child must have at least one candy.Children with a higher rating get more candies than their ne...
分类:其他好文   时间:2014-08-23 11:20:30    阅读次数:173
Remove Duplicates from Sorted Array
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-08-23 11:14:10    阅读次数:219
LeetCode--Populating Next Right Pointers in Each Node
由于题目意思是满二叉树:所以,对当前节点,设置它的左右子节点的next指针即可root->left->next = root->rightroot->right->next = root->next?root->next->left:NULL 1 /** 2 * Definition for bi....
分类:其他好文   时间:2014-08-22 22:24:49    阅读次数:233
LeetCode--Populating Next Right Pointers in Each Node II
同上题:但是这题需要考虑好对当前节点的left和right的next指针如何设置。 1 /** 2 * Definition for binary tree with next pointer. 3 * struct TreeLinkNode { 4 * int val; 5 * Tre...
分类:其他好文   时间:2014-08-22 22:23:59    阅读次数:324
Remove Duplicates from Sorted List
Given a sorted linked list, delete all duplicates such that each element appear only once.For example,Given 1->1->2, return 1->2.Given 1->1->2->3->3, ...
分类:其他好文   时间:2014-08-22 22:18:59    阅读次数:342
Largest Rectangle in Histogram
Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the hist...
分类:其他好文   时间:2014-08-22 21:04:59    阅读次数:168
jq图片切换特效
首先引入js,内容如下: 1 (function($){$.fn.slides=function(option){option=$.extend({},$.fn.slides.option,option);return this.each(function(){$('.'+option.contai...
分类:其他好文   时间:2014-08-22 19:25:29    阅读次数:220
POJ1844 Sum
Sum Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 10160   Accepted: 6674 Description Consider the natural numbers from 1 to N. By associating to each num...
分类:其他好文   时间:2014-08-22 17:55:49    阅读次数:179
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!