Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?分析:如果一个linked list中有环,那么在用一个快指针和一个慢指针遍历该li...
分类:
其他好文 时间:
2014-11-25 16:09:31
阅读次数:
194
Given two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space (size that is greater or equal...
分类:
其他好文 时间:
2014-11-25 16:00:36
阅读次数:
165
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 another array, you must do this in place with...
分类:
其他好文 时间:
2014-11-25 14:34:37
阅读次数:
210
css属性white-space省略我吧 省略我吧省略我吧省略我吧省略我吧省略我吧省略我吧省略我吧省略我吧省略我吧测试浏览器:IE6/7/8/9、opera12.02、firefox15.0.1、chrome21.0.1180.89m1、text-overflow:ellipsis;这里的重点样式是...
分类:
Web程序 时间:
2014-11-25 13:59:06
阅读次数:
205
命令行参数 操作符: space 与 (AND) | 或 (OR) ! 非 (NOT) 分组 " " 搜索引号内的词组. 通配符: * 匹配 0 个或多个字符. ? 匹配 1 个字符. *. 匹配不包含扩展的文件名. *...
分类:
其他好文 时间:
2014-11-24 23:55:47
阅读次数:
349
Given a string s consists of upper/lower-case alphabets and empty space characters '
', return the length of last word in the string.
If the last word does not exist, return 0.
Note: A word is...
分类:
其他好文 时间:
2014-11-24 19:21:31
阅读次数:
162
Given a linked list, swap every two adjacent nodes and return its head.
For example,
Given 1->2->3->4, you should return the list as 2->1->4->3.
Your algorithm should use only constant space. Y...
分类:
编程语言 时间:
2014-11-24 10:10:53
阅读次数:
155
Sort a linked list in O(n log n)
time using constant space complexity.
大家看完题目估计跟我一样啦。。。都在想哪些是nlogn啊~快速排序、归并排序、堆排序!然后开始愁,这些东西变成list了可怎么办啊。。。
可是我深深地记得在CMU的时候老师告诉我,java现在自带的Arrays.sort用的是快排,然后我就想,那么…...
分类:
编程语言 时间:
2014-11-24 10:10:04
阅读次数:
170
机器学习算法中文视频教程zouxy09@qq.comhttp://blog.csdn.net/zouxy09 在网上狂搜ReproducingKernel Hilbert Space的时候,找到了一个好东西。这个是李政軒Cheng-Hsuan Li的关于机器学习一些算法的中文视频教程。感觉讲得很.....
分类:
编程语言 时间:
2014-11-23 17:17:19
阅读次数:
213
Given a stringsand a dictionary of wordsdict, determine ifscan be segmented into a space-separated sequence of one or more dictionary words.For exampl...
分类:
其他好文 时间:
2014-11-23 17:13:25
阅读次数:
203