// linklist.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include #include using namespace std;struct student{ lo...
分类:
其他好文 时间:
2014-11-08 02:01:48
阅读次数:
230
typedef int DataType;typedef struct node{ DataType data; struct node* next;}LinkedNode,*LinkList;void ReverseList(LinkedNode* pCur,LinkList& Lis...
分类:
其他好文 时间:
2014-10-22 00:36:45
阅读次数:
135
一:递归版本 1 class LinkList 2 { 3 public class LinkNode 4 { 5 public int data; 6 7 public LinkNode next; 8 ...
分类:
其他好文 时间:
2014-10-17 15:27:07
阅读次数:
218
#include
#include
using namespace std;
typedef int ElemType;
typedef struct LNode
{
ElemType data;
struct LNode *next1,*next2;
}*LinkList;
int main()
{
int n,m,i,t;
cin>>n>>m;
LinkList L,p,tai...
分类:
其他好文 时间:
2014-10-11 18:44:15
阅读次数:
213
#include
#include
using namespace std;
typedef int ElemType;
typedef struct LNode
{
ElemType data;
struct LNode *next1,*next2;
}*LinkList;
int main()
{
int n,m,i,t;
cin>>n>>m;
LinkList L,p,tai...
分类:
其他好文 时间:
2014-10-11 17:53:55
阅读次数:
130
#define LOCAL#include#include#includeusing namespace std;typedef int ElemType;typedef struct Node{ ElemType data; struct Node *next;}Node,*LinkL...
分类:
其他好文 时间:
2014-10-09 00:27:07
阅读次数:
217
//链表
#include
#include
using namespace std;
typedef struct LNode
{
int data;
struct LNode *next;
}LNode,*LinkList;
int InitList_L(LinkList &L)
{
L=new LNode;
L->next=NULL;
return 1;
}
void Inpu...
分类:
其他好文 时间:
2014-10-01 00:16:00
阅读次数:
242
最近一段时间在看算法,发现实现链表有联众方法,本科的时候学习数据结构,对于链表来说,会先建立一个头结点,firstNode,而这个first结点本身是一个node,只不过值域为空,而next域则是指向随后的结点。而在Robert Sedgewick的算法书中,是另一种实现方法,first是一个指针....
分类:
其他好文 时间:
2014-09-24 20:00:37
阅读次数:
308
单链表:typedef struct Lnode{ ElemType data; /*数据域,保存结点的值 */ struct Lnode *next; /*指针域*/}LNode, *LinkList; /*结点的类型 */建表:1)头插...
分类:
其他好文 时间:
2014-09-22 16:31:12
阅读次数:
246