aboutsummaryrefslogtreecommitdiff
path: root/linked_list.h
blob: 40df9d7d082013eb0372d42e1946fa33037c56dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef __LINKED_LIST_H__
#define __LINKED_LIST_H__

struct node{
    int value;
    struct node* next;
};

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