2 ms·
Doesn't look like a linked list to me... Looks like an array.
by ggggtez 10y ago
Doesn't look like a linked list to me... Looks like an array.
- striking 10y agoIt's a list made of pointers to other cells. That's a linked list.
- decebalus1 10y agoWhat about an array of tuples where each tuple stores something and a reference to an index in the array? How about a dictionary? Can you implement a linked list using a dictionary? Everything can be a linked list if you try hard enough.
- gpderetta 10y ago>an array of tuples where each tuple stores something and a reference to an index in the array? That's not trying hard enough. That's litterally the definition of a cons cell. (The array is simply raw memory and the index is a pointer)