Skip to content

Commit 4f842b0

Browse files
bugfix: ArrayDeque 的 push() 新元素位置在物理位置头部
1 parent f8c320e commit 4f842b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/collection/arraydeque.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ System.out.println("弹出的元素为:" + pop); // 陈清扬
4848
// 修改栈顶元素
4949
stack.pop();
5050
stack.push("小明");
51-
System.out.println("修改后的栈为:" + stack); // [沉默, 小明]
51+
System.out.println("修改后的栈为:" + stack); // [小明, 沉默]
5252

5353
// 遍历队列查找元素
5454
Iterator<String> iterator = stack.iterator();

0 commit comments

Comments
 (0)