-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlist_sq.h
More file actions
41 lines (35 loc) · 1.15 KB
/
list_sq.h
File metadata and controls
41 lines (35 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* File: list_sq.h
* Author: jawinton
*
* Created on 2010年9月13日, 上午10:54
*/
#ifndef LIST_SQ_H
#define LIST_SQ_H
#ifdef __cplusplus
extern "C" {
#endif
#include "datastructure.h"
#define LIST_INIT_SIZE 100
#define LIST_INCREMENT 10
struct SqList{
ElemType *elem;
int length; //当前长度
int listsize; //当前分配的储存空间(以sizeof(ElemType)为单位)
};
Status ListInit(struct SqList* L);
Status ListInsert(struct SqList* L, ElemType e, int i);
Status ListDelete(struct SqList* L, ElemType *e, int i);
Status ListDeleteElem(struct SqList* L, ElemType e);
Status ListDeleteBetween(struct SqList* L,ElemType s,ElemType t);
Status SortedListDeleteBetween(struct SqList* L,ElemType s,ElemType t);
Status SortedListDeleteSame(struct SqList* L);
Status ListPrint(struct SqList* L);
Status ListMerge(struct SqList A, struct SqList B, struct SqList* C);
Status ListMerge_Point(struct SqList A, struct SqList B, struct SqList* C);
int Findelem(struct SqList * L,int elm);//返回查找到元素的数量
ElemType ListDeleteMin(struct SqList* L);
#ifdef __cplusplus
}
#endif
#endif /* LIST_SQ_H */