数据结构——带头结点的单链表

来源:互联网 发布:淘宝大件退货运费谁出 编辑:程序博客网 时间:2024/06/02 04:02

带头结点的单链表能够简化单链表的插入,删除等操作。

数据结构

typedef struct HLinkList{    datatype info;    struct LinkList* next;}HNode;

基本操作

HNode* init_hlink_list();void print_hlink_list(HNode* head);HNode* insert_in_front_hlink_list(HNode* head, datatype x);HNode* find_num_hlink_list(HNode* head, datatype x);HNode* find_pos_hlink_list(HNode* head, int i);HNode* insert_x_after_y(HNode* head, datatype x, datatype y);HNode* insert_x_after_i(HNode* head, datatype x, int i);HNode* delete_num_hlink_list(HNode* head, datatype x);HNode* delete_pos_hlink_list(HNode* head, int i);

待续。。。

0 0