-
Notifications
You must be signed in to change notification settings - Fork 0
/
SqList.h
41 lines (34 loc) · 945 Bytes
/
SqList.h
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
/*
* =====================================================================================
*
* Filename: SqList.h
*
* Description: 顺序存储线性表
*
* Version: 1.0
* Created: 11/29/2014 10:00:45 AM
* Revision: none
* Compiler: gcc
*
* Author: 张世龙 (mn), [email protected]
* Company: free
*
* =====================================================================================
*/
#ifndef GIT_JCOMMON_SQLIST_H
#define GIT_JCOMMON_SQLIST_H
#define MAXSIZE 20
typedef int ElemType;
typedef struct{
ElemType data[MAXSIZE];
int length;
}SqList;
void InitList(SqList *list);
int ListEmpty(SqList *list);
void ClearList(SqList *list);
int GetElem(SqList *list,int i,ElemType *e);
int LocateElem(SqList *list,ElemType *e);
int ListInsert(SqList *list,int i,ElemType *e);
int ListDelete(SqList *list,int i,ElemType *e);
int ListLength(SqList *list);
#endif