I've come up with worse when I was learning to program... My first language was C++ and when I was learning about data structures I came up with a randomly assessed linked list! The solution was simple... Allocate the nodes on a contiguous chunk of memory, and to random access just do
return ((Node*)&this->m_data[index * sizeof(Node)])->Data;
Want to create an element? Simple:
// this is more-or-less psudo code I just typed up. I no longer have the old code, but this is the basic method I used:
int size = (this->m_count + 1);
Node* temp = new Node[size];
memcpy(temp, this->m_data, sizeof(Node) * size);
delete [ this->m_data;
// alot of code to re-fix all of the m_next/m_prev pointers...
temp[size].Data = new_data;
this->m_data = temp;
// done!
I was really clever back then... You get the benifiet of random access, yet with the cost of all of the drawbacks of a vector without the benefits of a list...
So you can't really blame him... But all the same, I love laughing at others' silly mistakes almost as much as I love laughing at my own :)