41 lines
707 B
C
41 lines
707 B
C
|
#ifndef SQ_LIST_H
|
|||
|
#define SQ_LIST_H
|
|||
|
#define MAX 100
|
|||
|
#define elem_type int
|
|||
|
|
|||
|
|
|||
|
typedef struct sq_list
|
|||
|
{
|
|||
|
elem_type data[MAX];
|
|||
|
int length;
|
|||
|
} sq_list;
|
|||
|
|
|||
|
// <20><>ʼ<EFBFBD><CABC>
|
|||
|
sq_list *init_sq_list(void);
|
|||
|
|
|||
|
// ɾ<><C9BE>
|
|||
|
void delete_sq_list(sq_list* list, int pos);
|
|||
|
|
|||
|
// <20>滻
|
|||
|
void replace_sq_list(sq_list* list, int pos, elem_type value);
|
|||
|
|
|||
|
// <20><><EFBFBD><EFBFBD>
|
|||
|
void insert_sq_list(sq_list* list, int pos, elem_type value);
|
|||
|
|
|||
|
// <20><>ӡ
|
|||
|
void print_sq_list(sq_list* list);
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD>Ԫ<EFBFBD><D4AA>
|
|||
|
void get_sq_list(sq_list* list1,int pos, elem_type *e);
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
int locate_list(sq_list* list, elem_type e);
|
|||
|
|
|||
|
// <20>ϲ<EFBFBD>˳<EFBFBD><CBB3><EFBFBD><EFBFBD>1.0
|
|||
|
void merge_sq_list(sq_list* list_1, sq_list* list_2);
|
|||
|
|
|||
|
//<2F>ϲ<EFBFBD>˳<EFBFBD><CBB3><EFBFBD><EFBFBD>2.0
|
|||
|
void mer_ge_sq_list(sq_list* list_1, sq_list* list_2);
|
|||
|
#endif
|
|||
|
|