Java: Difference between ArrayList and LinkedList
2015-08-03 11:32
387 查看
Basically, they are just two different implementations of List interface.
LinkedList is implemented with a double-linked list; ArrayList is implemented with a dynamically resizing array.
所以基本的区别于list和array的区别很像,就是for random access, ArrayList is better; for adding and deleting, LinkedList is better.
LinkedList takes more space since it has to store both previous and next pointer. So large lists prefer arrayList.
LinkedList is implemented with a double-linked list; ArrayList is implemented with a dynamically resizing array.
所以基本的区别于list和array的区别很像,就是for random access, ArrayList is better; for adding and deleting, LinkedList is better.
LinkedList takes more space since it has to store both previous and next pointer. So large lists prefer arrayList.
相关文章推荐
- JS中跨页面调用变量和函数(例如a.js 和 b.js中互相调用)
- 【细解】如何基于bootstrap创建一个响应式的导航条
- Bootstrap组件之列表组
- ecshop类的解析2 json_encode和json_decode的具体实现
- CSS学习笔记
- react-native试玩(2)
- HTML结构 语义化思想
- 用JS获取地址栏参数的方法
- html5 postMessage解决跨域、跨窗口消息传递[转载]
- PHP使用缓存即时输出内容(output buffering)的方法
- 一款不错的JS日期插件 Mobiscroll
- 【学习笔记】HTML 5 拖放
- GAJavaScriptTracker javaScript 的足迹分析
- Count Complete Tree Nodes***
- jquery控制页面的展开和隐藏
- ajax请求原理及jquery $.ajax封装全解析
- Javascript nextElementSibling和nextSibling
- CSS a链接的四种状态
- bootstrap基础01
- js 只允许输入数字