码迷,mamicode.com
首页 > 其他好文 > 详细

ArrayList 与 LinkedList 的不区别?

时间:2020-07-04 13:16:55      阅读:62      评论:0      收藏:0      [点我收藏+]

标签:font   top   结构   ott   color   col   元素   off   数组   

最明显的区别是 ArrrayList 底层的数据结构是数组,支持随机访问,而 

LinkedList 的底层数据结构书链表,不支持随机访问。使用下标访问一个元素,

ArrayList 的时间复杂度是 O(1),而 LinkedList 是 O(n)。更多细节的讨论参见 

ArrayList 与 LinkedList 的不区别?

标签:font   top   结构   ott   color   col   元素   off   数组   

原文地址:https://www.cnblogs.com/programb/p/13019381.html

踩
(0)
赞
(0)
   
举报
评论 一句话评论(0)
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!