Simple linked list implementation using pointers