C_DS_AIgo/sq_list.h
Jdhggg 361849b19f #define elem_type int
添加`#define elem_type int` 方便后期更改类型
2025-03-21 13:07:47 +08:00

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;
// ³õʼ»¯
sq_list *init_sq_list(void);
// ɾ³ý
void delete_sq_list(sq_list* list, int pos);
// Ìæ»»
void replace_sq_list(sq_list* list, int pos, elem_type value);
// ²åÈë
void insert_sq_list(sq_list* list, int pos, elem_type value);
// ´òÓ¡
void print_sq_list(sq_list* list);
//»ñµÃÔªËØ
void get_sq_list(sq_list* list1,int pos, elem_type *e);
//²éÕÒ
int locate_list(sq_list* list, elem_type e);
// ºÏ²¢Ë³Ðò±í1.0
void merge_sq_list(sq_list* list_1, sq_list* list_2);
//ºÏ²¢Ë³Ðò±í2.0
void mer_ge_sq_list(sq_list* list_1, sq_list* list_2);
#endif