#include#include#include#include#include#include#include#include#include#include#include#include using namespace std;const int maxn=1111;int head[maxn...
分类:
其他好文 时间:
2014-07-19 19:39:41
阅读次数:
341
1.指针的联动
通过两个指针分别指向前驱和后继结点,并在单向链表上进行移动,当指针指向待处理的结点时,该结点的前驱也有指针指向。
2.设有一个无序单向链表,且数据域的值均不相同,使指针pmin指向最小值结点,并使指针prem指向最小值结点的前驱结点:
代码片段:
for(p = head; p; q = p, p = p->next)
{
if(pmin->data > p->...
分类:
其他好文 时间:
2014-07-18 21:26:41
阅读次数:
231
是head区的一个辅助标签names常用的选项有keywords(关键字)description(网站内容描述)auther(作者)robots(机器人向导)http-equiv可代替name项,常用的选项有Expires(期限) Pragma(cache模式) Refresh(刷新)Set-Coo...
分类:
其他好文 时间:
2014-07-18 19:31:09
阅读次数:
209
class Solution {public: ListNode *removeNthFromEnd(ListNode *head, int n) { if (head == NULL) return NULL; ListNode* pre = NULL; ...
分类:
其他好文 时间:
2014-07-18 18:24:55
阅读次数:
209
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><metahttp-equiv="Content-Type"content="text/html;charset=utf-8"/><title>prototype与jQuery冲突解决4<..
分类:
Web程序 时间:
2014-07-18 17:06:14
阅读次数:
224
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type"content="text/html;charset=utf-8"/><ti..
分类:
Web程序 时间:
2014-07-18 16:32:38
阅读次数:
241
The key of this problem is about details especially boundary conditions.class Solution {public: ListNode *deleteDuplicates(ListNode *head) { ...
分类:
其他好文 时间:
2014-07-18 14:36:54
阅读次数:
189
登录记录/var/run/utmp,/var/log/wtmpwtmp和utmp文件都是二进制文件,他们不能被诸如tail命令剪贴或合并(使用cat命令)。用户需要使用who、w、users、last和ac来使用这两个文件包含的信息。last命令往回搜索wtmp来显示自从文件第一次创建以来登录过的用...
分类:
系统相关 时间:
2014-07-18 14:21:39
阅读次数:
331
浅谈尾递归 2013-02-10 14:12:57 在《数据结构与算法分析:C描述》(Data Structures and Algorithm Analysis In C)的第三章中,以打印链表为例,提到了尾递归(tail recursion)并指出了尾递归是使用递归极其不当的例子,它指出虽然编译...
分类:
其他好文 时间:
2014-07-18 08:11:35
阅读次数:
162
ip.txt 里存储着ip信息 统计排序后取前10条awk '{cnt[$1]++} END{for (ip in cnt) print ip":"cnt[ip]}' ip.txt | sort -k 2 -rn -t":" | head -n 10awk '{cnt[$1]++} END{for ...
分类:
系统相关 时间:
2014-07-17 13:32:35
阅读次数:
12747