Is a Linked-List implementation without using pointers possible or not?

Sure, if you don’t mind the linked list having a maximum size, you could statically allocate an array of list nodes, and then use integer indices into the array as your “previous” and “next” values for each node, rather than pointers. I’ve done in this in the past to save a bit of memory (since an integer can be either 2 or 4 bytes, whereas on a 64-bit system a pointer will be 8 bytes)

Leave a Comment