Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * singly_linked_list.h
- *
- * Created on: Oct 16, 2019
- * Author: Bojan Rikic RA134/2016
- */
- #ifndef SINGLY_LINKED_LIST_H_
- #define SINGLY_LINKED_LIST_H_
- #include <stdio.h>
- #include <stdint.h>
- #include <stdlib.h>
- #include <inttypes.h>
- #include <stdbool.h>
- #include <assert.h>
- typedef struct node
- {
- int_least8_t value;
- struct node* next;
- } Node;
- typedef struct list
- {
- Node* head;
- } List;
- Node* create_node(int_least16_t new_value);
- List* make_list(void);
- void push_begin(List* singly_linked_list , int_least16_t n);
- void push_end(List* singly_linked_list, int_least16_t n);
- void print_list(const List* singly_linked_list);
- int_least16_t pop_last(List* singly_linked_list);
- void clear_list(List* singly_linked_list);
- void split_list(const List* singly_linked_list, List* list_with_even_index ,List* list_with_odd_index);
- void insert_in_list(const List* singly_linked_list, const Node *position,int_least16_t n);
- #endif /* SINGLY_LINKED_LIST_H_ */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement