3 ms·
What 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 lis
by decebalus1 10y ago
What 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)