Skip to content

Commit 1a44e95

Browse files
committed
// 下面两句代码,实际是构成循环列表。但是加不加,LeetCode都可以通过。
1 parent 4068229 commit 1a44e95

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

code/LeetCode/src/popular/MyCircularDeque.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ public MyCircularDeque(int k) {
2424
head.next = tail;
2525
tail.pre = head;
2626

27-
//head.next = tail;
28-
//tail.pre = head;
27+
// 下面两句代码,实际是构成循环列表。但是加不加,LeetCode都可以通过。
28+
head.pre = tail;
29+
tail.next = head;
2930

3031
size = 0;
3132
capacity = k;

0 commit comments

Comments
 (0)