码迷,mamicode.com
首页 >  
搜索关键字:extra    ( 2903个结果
[Leetcode][JAVA] Linked List Cycle I && II
Linked List CycleGiven a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?使用快慢指针,如果有循环两指针必定能相遇: 1 p...
分类:编程语言   时间:2014-10-08 04:32:34    阅读次数:298
【Leetcode】Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space.Some hints:Could negative integers be palindromes? (ie, -1)If you are thinki...
分类:其他好文   时间:2014-10-07 19:09:53    阅读次数:180
Set Matrix Zeroes
Given amxnmatrix, if an element is 0, set its entire row and column to 0. Do it in place.click to show follow up.Follow up:Did you use extra space?A s...
分类:其他好文   时间:2014-10-07 12:03:03    阅读次数:231
简单函数2
x-1 -->向x轴正向偏移-->sub the extra num run fasterx+1 -->向x轴负向偏移-->add the extra num then falling back1/x-->对称轴x=01/(x-1)-->对称轴 x=11/(x+1)-->对称轴 x=-1乘方越大.训...
分类:其他好文   时间:2014-10-06 19:14:50    阅读次数:158
《算法竞赛入门经典——训练指南》第二章题库
UVa特别题库 UVa网站专门为本书设立的分类题库配合,方便读者提交: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=442 注意,下面注有“extra”的习题并没有在书中出现,但在上面的特别题库中有,属于附加习题。 基础练习 (Basic Problems) ...
分类:其他好文   时间:2014-10-03 09:56:44    阅读次数:259
HDU-1053-Entropy(Huffman编码)
Problem Description An entropy encoder is a data encoding method that achieves lossless data compression by encoding a message with “wasted” or “extra” information removed. In other words, entropy ...
分类:其他好文   时间:2014-10-03 01:44:13    阅读次数:699
opencv 学习方法
1、 学习方法: http://www.opencv.org.cn/forum.php?mod=viewthread&tid=7055&extra=&page=1 首先还是说说如何学Opencv吧,记得最开始进实验室的时候师兄让看Opencv,当时的学术基础很差,编程能力也很一般,所以学Opencv...
分类:其他好文   时间:2014-10-03 00:12:33    阅读次数:547
Remove Duplicates from Sorted Array I&&II
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-10-01 19:08:51    阅读次数:163
leetcode--Linked List Cycle--判断链表是否有环
Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space? 这个题目用快慢指针来做,重点在于代码怎么实现的简洁方便理解。 这里用快指针来判断链表是不是有NULL,没有NULL那再继续走,看是否能与慢指针遇上...
分类:其他好文   时间:2014-10-01 10:16:10    阅读次数:309
LeetCode: Linked List Cycle [141]
【题目】Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?【题意】 推断一个单向链表是否有环【思路】 维护两个指针p1和p2,p1.....
分类:其他好文   时间:2014-09-28 21:16:55    阅读次数:195
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!