diff options
| author | leiyu3 <s444814187@gmail.com> | 2022-09-13 18:11:37 -0400 |
|---|---|---|
| committer | leiyu3 <s444814187@gmail.com> | 2022-09-13 18:11:37 -0400 |
| commit | e5efa02c2746a4207251daf0173b4808dd087e89 (patch) | |
| tree | e26425c1d27e45ffaa10cfb91675100a0de53908 /linked_list.h | |
| download | linked_list_c-e5efa02c2746a4207251daf0173b4808dd087e89.tar.gz linked_list_c-e5efa02c2746a4207251daf0173b4808dd087e89.zip | |
init
Diffstat (limited to 'linked_list.h')
| -rw-r--r-- | linked_list.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/linked_list.h b/linked_list.h new file mode 100644 index 0000000..1b2c3ca --- /dev/null +++ b/linked_list.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | #ifndef __LINKED_LIST_H__ | ||
| 2 | #define __LINKED_LIST_H__ | ||
| 3 | |||
| 4 | typedef struct node node; | ||
| 5 | struct node{ | ||
| 6 | int value; | ||
| 7 | node* next; | ||
| 8 | }; | ||
| 9 | |||
| 10 | int count_ll(node* ptr); | ||
| 11 | void prepend_ll(node **ptr, int value); | ||
| 12 | void append_ll(node* ptr, int value); | ||
| 13 | void print_ll(node* ptr); | ||
| 14 | void free_ll(node* ptr); | ||
| 15 | int update_node(node* ptr, int index, int value); | ||
| 16 | int delete_node(node **ptr, int index); | ||
| 17 | int get_value(node *ptr, int index); | ||
| 18 | node* search_node(node *ptr, int value); | ||
| 19 | void reverse_ll(node **ptr); | ||
| 20 | |||
| 21 | |||
| 22 | #endif | ||
