当前位置:网站首页>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.
边栏推荐
- 关于芯片你了解吗?
- [frp intranet penetration]
- cmdline -[command line,__fdt_pointer,initial_boot_params] boot_command_line 获取
- 深度学习理论课程第八、九、十章总结
- 动漫:海贼王女
- window下VS2022封装静态库以及调用静态库
- 使用JSP实现简单的登录注册功能,并且使用Session跟踪用户登录信息
- ZEMAX | 绘图分辨率结果对光线追迹的影响
- 自监督论文阅读笔记 TASK-RELATED SELF-SUPERVISED LEARNING FOR REMOTE SENSING IMAGE CHANGE DETECTION
- 【第四周】MobileNet和HybridSN
猜你喜欢
随机推荐
pandoc -crossref插件实现markdwon文档转word后公式编号自定义
SAP HANA 新增一列时报错详解
ZEMAX | 在设计抬头显示器(HUD)时需要使用哪些工具?
block底层探索
002_旭日X3派初探:TogetherROS安装
classpath:与classpath*的比较
Oracle 分区索引详解(local、global)
芯片解密工作应该具备哪些条件?唯样商城
Kotlin 中的泛型介绍
自监督论文阅读笔记SELF-SUPERVISED SPECTRAL MATCHING NETWORK FOR HYPERSPECTRAL TARGET DETECTION
在大程序中怎么样显示LED点阵
JSP的基本使用
建立平衡二叉树简单demo
Convolutional Nerual Nertwork(CNN)
ZEMAX | 如何创建复杂的非序列物体
new / malloc / delete / free之间的区别
采用Trench肖特基二极管,实现功率密度的显著提升
浮点型数据在内存中存储的表示
队列方法接收串口的数据
Gradle插件与代理服务器导致Sync Project失败的问题








