diff options
| author | Blake Romero <blake@blkrom.com> | 2025-10-10 17:43:54 +0100 |
|---|---|---|
| committer | Blake Romero <blake@blkrom.com> | 2025-10-10 17:43:54 +0100 |
| commit | 4e36efdf20ed9f7be0c98743b6ddfa54f472c849 (patch) | |
| tree | 9803384bb412df2c09df4eded432c30c09a64044 /src/ll.h | |
| parent | b188817ad2a0c26264b742fed55320260650ecb7 (diff) | |
Rename & refactor list data structure
Diffstat (limited to 'src/ll.h')
| -rw-r--r-- | src/ll.h | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/src/ll.h b/src/ll.h deleted file mode 100644 index 9286dfd..0000000 --- a/src/ll.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef LL_H -#define LL_H - -#define NEW_NODE llnode(); - -#include <stdio.h> -#include <stdlib.h> - -// Node -typedef struct Node { - int value; - struct Node* next; -} Node; - -// Create & initialise a new node -Node* llnode(int value); - -// Print linked list values -void llprint(Node* head); -void llvprint(Node* head); - -// Return number of nodes in list -// O(n) -int lllength(Node* head); - -// Prepend a value to the list -// O(1) -void llpush(Node** head, int value); - -// Pop (remove) first node -// O(1) -int llpop(Node** head); - -// Append value to the end of the list -// O(n) -void llappend(Node* head, int value); - -// Insert a value to the list at index -// O(n) -void llinsert(Node** head, int value, int index); - -// Free nodes from memory -// O(n) -void llfree(Node** head); - -// Remove last node -// O(n) -int llrmlast(Node** head); - -// Remove node at index -// O(n) -int llrm(Node** head, int index); - -#endif //LL_H |
