总结:
1.ArrayList是线性表(动态数组),LinkedList是链表
2.get,set方法,方法参数有指定位置数值的,ArrayList要优于LinkedList,因为,ArrayList有下标,LinkedList要移动指针。
3.新增和删除操作add和remove,LinkedList比较占优势,因为ArrayList需要移动数据
ArrayList和LinkedList的插入,取出时间复杂度
最新推荐文章于 2024-04-16 11:18:49 发布
博客总结了ArrayList和LinkedList的特点及性能差异。ArrayList是动态数组,LinkedList是链表。在get和set方法上,因ArrayList有下标,性能优于LinkedList;而在新增和删除操作add和remove上,LinkedList无需移动数据,更占优势。
8万+

被折叠的 条评论
为什么被折叠?



