当前位置:网站首页>6. What is the difference between Vector, ArrayList and LinkedList?(design, performance, safety)
6. What is the difference between Vector, ArrayList and LinkedList?(design, performance, safety)
2022-08-03 06:10:00 【Shiyu】
All implement the list interface, providing corresponding methods for adding, getting, and deleting objects, etc.
One, low-level design implementation, security, performance
Vector: The low-level implementation is implemented with an array, which is thread-safe, but inefficient. It is suitable for use in multiple threads, often reads objects, and uses less insertion and deletion.
ArrayList: The low-level implementation is implemented using an array, which is thread-unsafe and efficient. It is suitable for use in a single thread, often reads objects, and uses less insertion and deletion.
LinkedList: The low-level is implemented by a doubly linked list, which is not thread-safe and is suitable for reading less, frequently inserting and deleting objects.
Second, initial value, expansion multiple and expansion factor
Vector: 10 size+size*0.5+1= size*1.5+1 1
ArrayList: 10 size+size*1= 2*size 0.75
LinkedList: No expansion required, linked list implementation, dynamic expansion.
边栏推荐
- MCU接收串口字符型数据转换成数据型数据
- 进程间通讯 (IPC 技术) - 信号
- 自监督论文阅读笔记 DetCo: Unsupervised Contrastive Learning for Object Detection
- 自监督论文阅读笔记Reading and Writing: Discriminative and Generative Modelingfor Self-Supervised Text Recogn
- Oracle 分区索引详解(local、global)
- 电子元器件和电子元件的区别有那些?
- 深度学习基本概念
- ASP.NET MVC3的伪静态实现
- 自监督论文阅读笔记FIAD net: a Fast SAR ship detection network based on feature integration attention and self
- Qlik Sense 临时处理表数据详解(Resident)
猜你喜欢
随机推荐
A.1#【内存管理】——1.1.4 node: 初始化
SolidWorks 操作视频 | 流体分析结果演示
VCC(电源)和 GND(地)之间电容的作用
softmax和最大熵
Qlik Sense 赋值详解(Set、Let)
自监督论文阅读笔记 DenseCL:Dense Contrastive Learning for Self-Supervised Visual Pre-Training
解决Gradle Download缓慢的百种方法
【第一周】深度学习和pytorch基础
2021-04-30
servlet学习(七)ServletContext
[XSS, file upload, file inclusion]
自监督论文阅读笔记 Self-supervised Label Augmentation via Input Transformations
Kettle Spoon 安装配置详解
cb板上常用的电子元器件都有哪些?
损失函数(第五周)
全球一流医疗技术公司如何最大程度提高设计工作效率 | SOLIDWORKS 产品探索
classpath:与classpath*的比较
西塞罗 论老年
三分钟看懂二极管的所有基础知识点
浮点型数据在内存中存储的表示