From caa60ca993d1659b38cbcd441ad9e31b68181bf9 Mon Sep 17 00:00:00 2001 From: leiyu3 Date: Thu, 22 Sep 2022 12:33:41 -0400 Subject: fixes --- linked_list.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'linked_list.h') diff --git a/linked_list.h b/linked_list.h index 1b2c3ca..40df9d7 100644 --- a/linked_list.h +++ b/linked_list.h @@ -1,22 +1,22 @@ #ifndef __LINKED_LIST_H__ #define __LINKED_LIST_H__ -typedef struct node node; struct node{ int value; - node* next; + struct node* next; }; -int count_ll(node* ptr); -void prepend_ll(node **ptr, int value); -void append_ll(node* ptr, int value); -void print_ll(node* ptr); -void free_ll(node* ptr); -int update_node(node* ptr, int index, int value); -int delete_node(node **ptr, int index); -int get_value(node *ptr, int index); -node* search_node(node *ptr, int value); -void reverse_ll(node **ptr); +int count_ll(struct node* ptr); +struct node* init_ll(int value); +void prepend_ll(struct node **ptr, int value); +void append_ll(struct node* ptr, int value); +void print_ll(struct node* ptr); +void free_ll(struct node* ptr); +int update_node(struct node* ptr, int index, int value); +int delete_node(struct node **ptr, int index); +int get_value(struct node *ptr, int index); +struct node* search_node(struct node *ptr, int value); +void reverse_ll(struct node **ptr); #endif -- cgit v1.2.3