3 ms·
One of the main points of linked lists is that you can manipulate the structure (sort, reverse, etc.) without copying the payloads. So in C, always in place un
by sfk 16y ago
One of the main points of linked lists is that you can manipulate the structure (sort, reverse, etc.) without copying the payloads.
So in C, always in place unless explicitly specified otherwise.
- tkahn6 16y agoUnless you're dealing with primitive data types, aren't your payloads just pointers (to structs or null-terminated strings)? Or is it more usual to allocate space within the node and memcpy the bits in? I've always wondered that. Thanks