Re: [OT] C programming, variable size array
>>>>> "Alex" == Alex Malinovich <email@example.com> writes:
Alex> And I wouldn't even bother putting the linked list into an array
Alex> in the first place. If you write a good linked list implementation
Alex> (which, as I said, would be a good exercise) it will already
Alex> support all of the functions that you're likely to need with an
Alex> array, so you might as well just keep it as a linked list.
Definitely not. Linked lists and arrays have very different
performance characteristics for different operations. There is no
efficient way to do random access on a linked list. Efficient
implementation requires choosing a proper data structure. Choose the
wrong data structure, and something that should take milliseconds could
end up taking minutes, hours, or even days.
Hubert Chan <firstname.lastname@example.org> - http://www.uhoreg.ca/
PGP/GnuPG key: 1024D/124B61FA
Fingerprint: 96C5 012F 5F74 A5F7 1FF7 5291 AF29 C719 124B 61FA
Key available at wwwkeys.pgp.net. Encrypted e-mail preferred.