【题目】
原文:
2.2 Implement an algorithm to find the nth to last element of a singly linked list.
译文:
实现一个算法从一个单链表中返回倒数第n个元素。
【分析】
【思路一】
(1)创建两个指针p1和p2,指向单链表的开始节点。
(2)使p2移动n-1个位置,使之指向从头...
分类:
其他好文 时间:
2014-05-22 09:03:53
阅读次数:
315
Find paths whose node values equal to N in binary
tree.
分类:
其他好文 时间:
2014-05-22 05:13:14
阅读次数:
280
How to recursively count files in a linux
directory?find DIR_NAME -type f | wc -lfind DIR_NAME -type f -print | wc
-l查找包含alias字符串的*.conf的文件find / -nam...
分类:
系统相关 时间:
2014-05-22 03:52:45
阅读次数:
422
出现找不到xib指定的图片,需要指定图片的完整路径,不能只是图片名详见:http://vocaro.com/trevor/blog/2012/10/21/xcode-groups-vs-folder-references/An
image stored as a folder reference w...
分类:
移动开发 时间:
2014-05-22 03:44:48
阅读次数:
491
Find the inverse Kth node of a linked list.
分类:
其他好文 时间:
2014-05-22 03:29:46
阅读次数:
247
ThinkPHP的核心采用的框架模式是CBD,也就是核心Core+行为Behavior+驱动Driver,核心也就是整个框架模式的核心,大部分都是一些基类,去规定规则,Behavior是行为,就是在指定的地方调用来完成一些特定的行为功能,而Driver驱动就类似cache缓存驱动,mysqldb数据库驱动等,完成功能行为..
分类:
Web程序 时间:
2014-05-20 22:45:40
阅读次数:
456
[dmtsai@www~]$find/home-name.bashrc>list2>&1<==正确
[dmtsai@www~]$find/home-name.bashrc&>list<==正确/dev/null垃圾桶黑洞装置与特殊写法1>:以覆盖的方法将『正确的数据』输出到指定的文件或装置上;1>>:以累加的方法将『正确的数据』..
分类:
系统相关 时间:
2014-05-20 21:01:11
阅读次数:
423
对nutch添加中文网站抓取功能。1、中文网页抓取A、调整mysql配置,避免存入mysql的中文出现乱码。修改${APACHE_NUTCH_HOME}/runtime/local/conf/gora.properties################################MySQLproperties################################gora.sqlstore.jdbc.driver=com..
分类:
Web程序 时间:
2014-05-20 19:17:55
阅读次数:
539
【题目】
Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.
For "(()", the longest valid parentheses substring is "()", which has length = 2.
Another example is ")()())", whe...
分类:
其他好文 时间:
2014-05-20 16:39:07
阅读次数:
280