Skip to content

Instantly share code, notes, and snippets.

View maurymarkowitz's full-sized avatar

Maury Markowitz maurymarkowitz

  • WhiteNile Systems
  • Toronto-ish
View GitHub Profile
@System-Glitch
System-Glitch / LinkedList.c
Last active March 15, 2023 18:44
A simple generic linked list implementation in C
#include <stdlib.h>
#include "LinkedList.h"
/**
* Creates an empty linkedlist_t. head is set to NULL and length to 0.
*/
linkedlist_t *linkedlist_init() {
linkedlist_t *list = malloc(sizeof(linkedlist_t));
if(list == NULL) return NULL;
list->length = 0;