Eric's Blog

有需求才有进步

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
1.What’s the difference between a linked list and an array?
First what is a linked list?
A linked list is a dynamically sized array. An array has a size and you have to deal with it you cant just resize an array. Unlike an array a linked list has no absolute size. It can hold as many variables as you want it to.
when to use?
In circumstances where you dont know how many variables you want to add. For example it could be just 1 or it could be 1000. In such a situation its stupid to make an array of 10000 it would be a waist of memory.




posted on 2008-02-25 22:46  Eric.Chai  阅读(255)  评论(0编辑  收藏  举报