Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Here's an implementation of a doubly-linked list which is perfectly fine on modern hardware: an array of structs where each struct contains a pointer to its next and previous elements in addition to whatever other data is being stored.

Here's a situation where a traditional pointer-based double-linked list is fine: when the payload is very large (e.g., an entire document in some app).





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: