提交 45ade7b9 编写于 作者: W wizardforcel

ch5 fix

上级 03f81be6
......@@ -195,7 +195,7 @@ public static void profileLinkedListAddEnd() {
## 5.5 结构的选择
对于头部插入和阐述,双链表的实现优于`ArrayList`。对于尾部插入和删除,都是一样好。所以,`ArrayList`唯一优势是`get``set`,链表中它需要线性时间,即使是双链表。
对于头部插入和删除,双链表的实现优于`ArrayList`。对于尾部插入和删除,都是一样好。所以,`ArrayList`唯一优势是`get``set`,链表中它需要线性时间,即使是双链表。
如果你知道,你的应用程序的运行时间取决于`get``set`元素的所需时间,则`ArrayList`可能是更好的选择。如果运行时间取决于在开头或者末尾附加添加和删除元素,`LinkedList`可能会更好。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册