摘要: //插入排序#includeint main(){ int n,i,j,a[100]; a[0]=NULL; scanf("%d",&n); for(i=1;iint main(){ int n,i,j,s,a[100]; scanf("%d",&n); for(i=0;iint main(){ i... 阅读全文
posted @ 2014-07-27 10:17 NYNU_ACM 阅读(203) 评论(0) 推荐(0) 编辑
摘要: #includetypedef struct LNode{ int data; struct LNode *next;}LNode,*LinkList;void union1(LinkList &La,LinkList &Lb){ LinkList qb; LinkList pa=La->next-... 阅读全文
posted @ 2014-07-27 10:12 NYNU_ACM 阅读(195) 评论(0) 推荐(0) 编辑
摘要: #includeconst int LIST_INIT_SIZE=100;const int LISTINCRMENT=10;typedef int A;typedef struct{ A *elem; int Length; int Listsize; int incrementsize;}SqL... 阅读全文
posted @ 2014-07-27 10:08 NYNU_ACM 阅读(215) 评论(0) 推荐(0) 编辑
摘要: #includetypedef int A;const int LIST_INIT_SIZE=100;const int LISTINCRMENT=10;typedef struct{ A *elem; int Length; int Listsize; int incrementsize;}SqL... 阅读全文
posted @ 2014-07-27 10:05 NYNU_ACM 阅读(493) 评论(0) 推荐(0) 编辑
摘要: #includetypedef struct DuLNode{ int data; struct DuLNode *prior; struct DuLNode *next;}DuLNode,* DuLinkList;void ListDelete(DuLinkList &L,DuLNode *p,i... 阅读全文
posted @ 2014-07-27 10:04 NYNU_ACM 阅读(222) 评论(0) 推荐(0) 编辑
摘要: #includetypedef struct DuLNode{ int data; struct DuLNode *prior; struct DuLNode *next;}DuLNode,* DuLinkList;void ListInsert(DuLinkList &L,DuLNode *p,D... 阅读全文
posted @ 2014-07-27 10:03 NYNU_ACM 阅读(224) 评论(0) 推荐(0) 编辑
摘要: #includetypedef struct LNode{ int data; struct LNode *next;}LNode,*LinkList;void union1(LinkList &La,LinkList &Lb){ LinkList s,p,pre; if(!La) La=Lb; e... 阅读全文
posted @ 2014-07-27 09:59 NYNU_ACM 阅读(181) 评论(0) 推荐(0) 编辑
摘要: #includetypedef struct LNode{ int data; struct LNode *next;}LNode,*LinkList;void ListDelete(LinkList &L,LNode *p,int &e){ LinkList q; if(p==L) L=p->n... 阅读全文
posted @ 2014-07-27 09:56 NYNU_ACM 阅读(328) 评论(0) 推荐(0) 编辑
摘要: #includetypedef struct LNode{ int data; struct LNode *next;}LNode,*LinkList;void ListInsert(LinkList &L,LNode *p,LNode *s){ LinkList q; if(p==L) { s-... 阅读全文
posted @ 2014-07-27 09:55 NYNU_ACM 阅读(198) 评论(0) 推荐(0) 编辑
摘要: #includetypedef struct LNode{ int data; int length ; struct LNode *next;}LNode,*LinkList;int count = 0 ; //与length的相同LNode * LocateElem(LinkList L,... 阅读全文
posted @ 2014-07-27 09:53 NYNU_ACM 阅读(374) 评论(0) 推荐(0) 编辑
摘要: #includetypedef struct LNode{ int data; struct LNode *next;}LNode,*LinkList;int ListLength(LinkList L){ LinkList p=L; int k=0; while(p!=NULL) { k++; ... 阅读全文
posted @ 2014-07-27 09:45 NYNU_ACM 阅读(745) 评论(0) 推荐(0) 编辑
摘要: #includetypedef struct LNode{ int data; struct LNode *next;}LNode,*LinkList;void InvertLinkedList(LinkList &L){ LinkList p=L; L=NULL; while(p!=NULL) {... 阅读全文
posted @ 2014-07-27 09:44 NYNU_ACM 阅读(210) 评论(0) 推荐(0) 编辑
摘要: #includetypedef int A;typedef struct LNode{ A data; struct LNode *next;}LNode,*LinkList;void CreateList(LinkList &L,A a[],int n){ int i; L=NULL; for(i... 阅读全文
posted @ 2014-07-27 09:42 NYNU_ACM 阅读(267) 评论(0) 推荐(0) 编辑
摘要: #includetypedef int A;const int LIST_INIT_SIZE=100;const int LISTINCRMENT=10;typedef struct{ A *elem; int Length; int Listsize; int incrementsize;}Lis... 阅读全文
posted @ 2014-07-27 09:40 NYNU_ACM 阅读(330) 评论(0) 推荐(0) 编辑
摘要: #includetypedef int A;const int LIST_INIT_SIZE=100;const int LISTINCRMENT=10;typedef struct{ A *elem; int Length; int Listsize; int incrementsize;}Lis... 阅读全文
posted @ 2014-07-27 09:36 NYNU_ACM 阅读(285) 评论(0) 推荐(0) 编辑
摘要: #includetypedef int A;const int LIST_INIT_SIZE=100;const int LISTINCREMENT=10;typedef struct{ A *elem; int length; int listsize; int incrementsize;}Li... 阅读全文
posted @ 2014-07-27 09:30 NYNU_ACM 阅读(250) 评论(0) 推荐(0) 编辑
摘要: #includetypedef int A;const int LIST_INIT_SIZE=100;const int LISTINCREMENT=10;typedef struct{ A *elem; int length; int listsize; int incrementsize;}Sq... 阅读全文
posted @ 2014-07-27 09:29 NYNU_ACM 阅读(263) 评论(0) 推荐(0) 编辑