C_DS_AIgo/sq_list.h

41 lines
707 B
C
Raw Permalink Normal View History

2025-03-17 14:00:57 +08:00
#ifndef SQ_LIST_H
#define SQ_LIST_H
#define MAX 100
#define elem_type int
2025-03-17 14:00:57 +08:00
2025-03-20 18:07:55 +08:00
2025-03-17 14:00:57 +08:00
typedef struct sq_list
{
elem_type data[MAX];
2025-03-17 14:00:57 +08:00
int length;
} sq_list;
// <20><>ʼ<EFBFBD><CABC>
sq_list *init_sq_list(void);
2025-03-17 14:00:57 +08:00
// ɾ<><C9BE>
2025-03-17 14:24:44 +08:00
void delete_sq_list(sq_list* list, int pos);
2025-03-17 14:00:57 +08:00
// <20>
void replace_sq_list(sq_list* list, int pos, elem_type value);
2025-03-17 14:00:57 +08:00
// <20><><EFBFBD><EFBFBD>
void insert_sq_list(sq_list* list, int pos, elem_type value);
2025-03-17 14:00:57 +08:00
// <20><>ӡ
void print_sq_list(sq_list* list);
2025-03-20 22:44:30 +08:00
//<2F><><EFBFBD><EFBFBD>Ԫ<EFBFBD><D4AA>
void get_sq_list(sq_list* list1,int pos, elem_type *e);
2025-03-20 22:44:30 +08:00
//<2F><><EFBFBD><EFBFBD>
int locate_list(sq_list* list, elem_type e);
2025-03-20 22:44:30 +08:00
// <20>ϲ<EFBFBD>˳<EFBFBD><CBB3><EFBFBD><EFBFBD>1.0
2025-03-20 18:07:55 +08:00
void merge_sq_list(sq_list* list_1, sq_list* list_2);
2025-03-20 22:44:30 +08:00
//<2F>ϲ<EFBFBD>˳<EFBFBD><CBB3><EFBFBD><EFBFBD>2.0
void mer_ge_sq_list(sq_list* list_1, sq_list* list_2);
2025-03-17 14:00:57 +08:00
#endif