1 #include 2 #include 3 4 typedef struct node { 5
int data; 6 node * next; 7 }Node, *pNode; 8 9 pNode CreateList() {10 pNode head,
p1...
分类:
其他好文 时间:
2014-05-13 10:46:30
阅读次数:
297
一、list_for_each
1.list_for_each原型
#define list_for_each(pos, head) for (pos = (head)->next, prefetch(pos->next); pos != (head); pos = pos->next, prefetch(pos->next))
它实际上是一个 for 循环,利用...
分类:
其他好文 时间:
2014-05-13 08:50:12
阅读次数:
506
几乎所有编程语言中都提供了"生成一个随机数"的方法,也就是调用这个方法会生成一个数,我们事先也不知道它生成什么数。比如在.Net中编写下面的代码:
Random rand = newRandom();
Console.WriteLine(rand.Next());
运行后结果如下:
Next()方法用来返回一个随机...
分类:
编程语言 时间:
2014-05-13 00:31:16
阅读次数:
484
PermutationsTime Limit:1000MSMemory
Limit:65536KTotal Submissions:2549Accepted:1336DescriptionWe remind that the
permutation of some final set is a on...
分类:
其他好文 时间:
2014-05-12 12:36:19
阅读次数:
330
/*1、线性表练习(1)从给定顺序表A中删除元素值在x到y(x=x&&A[i]max)
max=A[i]; else if(A[i]data=e; L->next=NULL; } else { if(i==1) ...
分类:
其他好文 时间:
2014-05-11 23:26:26
阅读次数:
384
这里用邻接表实现图的深度优先遍历,采用递归实现。
#include
using namespace std;
#define VERTEXNUM 5//结点数
struct edgenode
{
int to;
int weight; // 边的权值
edgenode *next;
};
struct vnode
{
int from...
分类:
其他好文 时间:
2014-05-11 20:46:16
阅读次数:
519
//链表操作:建立、插入、删除、查找、倒置、删除等基本操作
#include
#include
typedef
struct LNode
{
int data;
structLNode *next;
}LNode,*Llist;
LNode *creat_head();//创建一个空表
void creat_list(LNode *,int);//创...
分类:
其他好文 时间:
2014-05-11 03:33:11
阅读次数:
351
ASP Session 对象 Previous Page Next Page Session
对象用于存储用户的信息。存储于 session 对象中的 变量握有单一用户的信息,并且对于一个应用程序中的所有页面都是可用的。 Session 对象
当您操作某个应用程序时,您打开它,做些改变,...
分类:
Web程序 时间:
2014-05-10 22:15:54
阅读次数:
374
ASP Application 对象 Previous Page Next Page
在一起协同工作以完成某项任务的一组 ASP 文件称作应用程序 (application)。ASP 中的 Application 对象用于将这些文件捆绑在一起。
Application 对象 web 上的...
分类:
移动开发 时间:
2014-05-10 21:04:39
阅读次数:
394
坑爹地多次过,全都是写程序时不注意的小问题,书写习惯还需要进一步改善。遇到的bug有:忘记return语句;定义ListNode
runner = head.next,却将判断head==null的情况放在这句之后;
忘记了新的head将不会是原来的那个head,而是head.next;所以以后遇到...
分类:
其他好文 时间:
2014-05-10 06:59:37
阅读次数:
320