chaobk
|
394043949e
|
LinkedList指定位置插入/删除,遍历平均元素应该是n/4个元素
因为本身就有头尾指针,遍历元素的时候会从最近的指针出发,最多会遍历n/2个元素,平均应该是n/4。Java8源码片段如下:
Node<E> node(int index) {
// assert isElementIndex(index);
if (index < (size >> 1)) {
Node<E> x = first;
for (int i = 0; i < index; i++)
x = x.next;
return x;
} else {
Node<E> x = last;
for (int i = size - 1; i > index; i--)
x = x.prev;
return x;
}
}
|
2024-09-08 22:38:00 +08:00 |
|
jingwl
|
9deb83cd76
|
Update redis-data-structures-02.md
'start 和 end 之间' 比 'start 和 end 之前' 更易于理解,不易产生误解。
|
2024-09-08 10:42:07 +08:00 |
|
Guide
|
223fd4f18f
|
Merge pull request #2477 from null-1024/patch-1
typo maven-best-practices.md
|
2024-09-07 17:37:37 +08:00 |
|
Guide
|
93b80ea985
|
[docs update]线程池参数常用公式修改
|
2024-09-07 17:36:39 +08:00 |
|
Guide
|
9d3ae71046
|
[docs update]新增面试题: MySQL 性能怎么优化?
|
2024-09-07 17:32:06 +08:00 |
|
Guide
|
9b62186e76
|
[docs update]完善深度分页优化
|
2024-09-07 17:31:31 +08:00 |
|
nullptr
|
40bcf6dacd
|
typo maven-best-practices.md
|
2024-09-06 23:42:07 +08:00 |
|
hamster
|
66c4141050
|
修改一处错别字
|
2024-09-05 21:56:37 +08:00 |
|
Guide
|
322abf45c3
|
Merge pull request #2473 from Dllragon/main
Update jvm-garbage-collection.md 引号反了
|
2024-09-05 12:20:44 +08:00 |
|
chaobk
|
d4de9a025b
|
删除多余字
|
2024-09-04 23:20:39 +08:00 |
|
DAI LILONG
|
3c6e434d46
|
Update jvm-garbage-collection.md 标点调整与内容更新
修改了错误使用的中文冒号;更新默认使用G1的JDK范围至JDK22
|
2024-09-04 16:53:47 +08:00 |
|
DAI LILONG
|
42c70053ee
|
Update jvm-garbage-collection.md 引号反了
引号反了
|
2024-09-04 16:16:05 +08:00 |
|
Guide
|
9b3a71c2cb
|
[docs update]IoC和AOP详解完善
|
2024-09-04 16:13:41 +08:00 |
|
T0kisaki-Kurumi
|
2341164a7d
|
Update red-black-tree.md
内容勘误
|
2024-08-30 11:38:27 +08:00 |
|
Vast Gui
|
73ed94d697
|
[docs fix]修复重复表达错误
|
2024-08-28 19:24:16 +08:00 |
|
Guide
|
f2b24072b5
|
[docs updete]typo
|
2024-08-21 12:26:42 +08:00 |
|
Guide
|
2d6445071e
|
[docs update]部分面试题回答完善&博客项目推荐
|
2024-08-19 17:00:05 +08:00 |
|
Guide
|
7c6fcbaab7
|
[docs update]完善2xx Success(成功状态码)总结
|
2024-08-19 16:59:28 +08:00 |
|
Guide
|
5fe494a0ca
|
[docs update]分布式书籍推荐完善
|
2024-08-19 16:59:01 +08:00 |
|
Guide
|
557d658b7d
|
Merge pull request #2455 from WindLYLY/main
优化表达便于理解
|
2024-08-15 23:44:32 +08:00 |
|
WindLY
|
e29f141936
|
Update java-concurrent-questions-03.md
|
2024-08-15 22:20:20 +08:00 |
|
WindLY
|
cb70cdf321
|
Update java-concurrent-questions-03.md
|
2024-08-15 22:18:59 +08:00 |
|
WindLY
|
641f4fa4a9
|
Update jmm.md
|
2024-08-15 16:15:28 +08:00 |
|
WindLY
|
a4fb6dcd80
|
Update jmm.md
|
2024-08-15 16:13:00 +08:00 |
|
FoxTian
|
611c015aeb
|
Update other-network-questions.md
修改 http/2.0 与 http/3.0 对比中的 安全性描述
|
2024-08-13 22:33:59 +08:00 |
|
Guide
|
c0535df01c
|
[docs update]完善HTTP/2.0 和 HTTP/3.0 的对比
|
2024-08-13 16:01:02 +08:00 |
|
凉快
|
c33993496c
|
[docs fix]修复拼写错误
|
2024-08-12 11:59:51 +08:00 |
|
Guide
|
af341e3b05
|
[docs update]完善回答HashMap 的长度为什么是 2 的幂次方
|
2024-08-11 15:33:02 +08:00 |
|
Guide
|
ee1e7a5140
|
Merge branch 'main' of github.com:Snailclimb/JavaGuide
|
2024-08-10 20:38:24 +08:00 |
|
Guide
|
e29ad07899
|
[docs update]内容完善
|
2024-08-10 20:38:10 +08:00 |
|
scclsy
|
18b27250aa
|
[doc update]增加关于-Xverify:none 和-noverify 被弃用说明
|
2024-08-08 16:18:25 +08:00 |
|
Guide
|
a89d33f02d
|
Merge pull request #2444 from sweetning0809/main
优化关于String builder和string +的对比及选择
|
2024-08-04 19:27:38 +08:00 |
|
ning
|
0ca3a95814
|
Update java-basic-questions-02.md
add describe
|
2024-08-04 15:46:51 +08:00 |
|
ning
|
b75ee23d39
|
Update java-basic-questions-02.md
fix describe text between string builder and string +
|
2024-08-04 15:41:36 +08:00 |
|
SDF001
|
c96311d82d
|
Update interview-experience.md
|
2024-08-04 11:30:14 +08:00 |
|
Guide
|
4acc22c947
|
Merge pull request #2440 from WindLYLY/main
Update arraylist-source-code.md
|
2024-07-30 09:36:42 +08:00 |
|
WindLY
|
e305618723
|
Update arraylist-source-code.md
|
2024-07-29 16:53:10 +08:00 |
|
WindLY
|
979800a553
|
Update java-collection-questions-02.md
|
2024-07-29 11:30:49 +08:00 |
|
Guide
|
94a0c4ceb7
|
[docs update]部分描述完善
|
2024-07-27 18:18:34 +08:00 |
|
玘珞
|
e1e809c9d7
|
Update sql-questions-03.md
表里只有10条数据,修改11次作答记录为10次
|
2024-07-24 11:42:55 +08:00 |
|
Guide
|
b5491ffb35
|
Merge pull request #2434 from DavidWhom/patch-2
Update other-network-questions.md
|
2024-07-22 20:18:05 +08:00 |
|
Guide
|
6232dd3f14
|
[docs add]新增文章程序员最该拿的几种高含金量证书
|
2024-07-22 19:26:12 +08:00 |
|
Guide
|
4f87ee846e
|
[docs update]完善问题:面向对象和面向过程的区别
|
2024-07-21 12:56:33 +08:00 |
|
Guevara
|
47df1a878b
|
Update other-network-questions.md
移除多余的括号
|
2024-07-19 14:26:16 +08:00 |
|
Guide
|
2271678f14
|
Merge pull request #2432 from qiliq/patch-1
Update tree.md
|
2024-07-17 21:53:15 +08:00 |
|
玘珞
|
a2bdb8e2b6
|
Update tree.md
修改完全二叉树的描述,便于理解
|
2024-07-17 19:07:59 +08:00 |
|
Guevara
|
b5c1dcbc1c
|
Update nio-basis.md
多打了一个“主”
|
2024-07-17 17:02:06 +08:00 |
|
Guide
|
b392abd1e7
|
Update atomic-classes.md
|
2024-07-17 13:31:32 +08:00 |
|
Guide
|
fe697ad4a3
|
[docs update&add]完善部分内容描述&新增一篇cas详解
|
2024-07-17 12:53:20 +08:00 |
|
Guide
|
97dd88a54c
|
[docs update]完善对接口和抽象类的描述
|
2024-07-14 18:05:30 +08:00 |
|