//使用数组queue[ ]存放结点队列void BFS( ) { head=0; tail=1; queue[head]=首结点的值; while (head<tail) //队列不空 { temp=tail; for (k=head; k<=ta...
分类:
其他好文 时间:
2014-08-03 23:03:16
阅读次数:
250
把下面这句放到head之间,title要放在这句下面
必须是utf-8 ,如果一不小心写成utf8,在safari中没问题,IE中还是乱码...
分类:
Web程序 时间:
2014-08-03 18:01:35
阅读次数:
237
Corner cases!class Solution {public: ListNode *deleteDuplicates(ListNode *head) { if (!head) return head; if (!head->next) return hea...
分类:
其他好文 时间:
2014-08-03 07:51:34
阅读次数:
237
Nothing special. A typical list manipulation problem.class Solution {public: ListNode *partition(ListNode *head, int x) { if (!head) return ...
分类:
其他好文 时间:
2014-08-03 07:50:15
阅读次数:
214
装完FreeBSD10的安装,安装完退出之后,发现启动项里面只剩下fedora的启动项,我的电脑是Fedora20+FreeBSD双系统,想用GRUB引导修复freeBSD的启动项,网上搜了一堆方法。但是都不可行。
我的FreeBSD是装在gpt5中
修改/ect/grub.d/40-custom
#!/bin/sh
exec tail -n +3 $0
# This file provides...
分类:
其他好文 时间:
2014-08-03 01:47:54
阅读次数:
245
1.http://sourceforge.net/p/cutycapt/code/HEAD/tree/CutyCapt/svn checkout http://svn.code.sf.net/p/cutycapt/code/ cutycapt-code下载的代码结构cutycapt-code/Cut...
分类:
其他好文 时间:
2014-08-03 01:40:44
阅读次数:
388
struct Node{ int data; Node *next;};//创建链表 输入为数字,如果输入0 链表结束(0不计)Node *creat(){ Node *head,*p,*s; int x,cycle=1; head=(Node *)malloc(siz...
分类:
其他好文 时间:
2014-08-02 20:50:24
阅读次数:
292
问题:交换相邻的两个结点分析:建立新链表每次插入ret->next后在插入ret,需要在判断下若最后只有一个结点不需要交换,注意每次交换了结点要把尾结点的下一个指向空class Solution {public: ListNode *swapPairs(ListNode *head) { ...
分类:
其他好文 时间:
2014-08-02 18:16:13
阅读次数:
178
$ adb devices | tail -n +2 | cut -sf 1 | xargs -I X adb -s X install pathto/myapp-release.apk
分类:
移动开发 时间:
2014-08-02 12:30:23
阅读次数:
181
#include
#include
#define maxn 10002
int ans, queue[maxn];
struct Node{
int to, next, val;
} map[maxn << 1];
struct node{
int first, money, indegree;
} head[maxn];
bool topoSort(int n)
{...
分类:
其他好文 时间:
2014-08-02 10:07:43
阅读次数:
196