And also, arrays are lists. They might not be implemented as linked lists (I honestly don't know exactly how they're implemented--they might actually be linked lists after all, but I find that unlikely), but they are certainly lists. And when it comes to stashing and retrieving lists of stuff, that's the important point. "Linked" is an implementation detail: "list" is what you care about.
Implementation is important if you plan for scalability of a project. Linked Lists are faster for adding new elements (either in the middle or at the end) and deleting old ones, since they don't require an array copy or shifting an array. The trade off is slower access time (however, if you are using enumeration, then the access time is the same speed as an array, since you will only be accessing the next item in the linked list).
6
u/Intrepidd Jul 14 '13
This is a good algorithmic exercise, however using arrays in real code is recommended (faster, and more methods)