We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 73f5abe commit 238f747Copy full SHA for 238f747
src/data-structures/doubly-linked-list/README.zh-CN.md
@@ -19,7 +19,7 @@ Add(value)
19
Pre: value is the value to add to the list
20
Post: value has been placed at the tail of the list
21
n ← node(value)
22
- if head = ø
+ if head != ø
23
head ← n
24
tail ← n
25
else
@@ -51,7 +51,7 @@ Remove(head, value)
51
return true
52
end if
53
n ← head.next
54
- while n = !ø and value !== n.value
+ while n != ø and value !== n.value
55
n ← n.next
56
end while
57
if n = tail
@@ -74,7 +74,7 @@ ReverseTraversal(tail)
74
Pre: tail is the node of the list to traverse
75
Post: the list has been traversed in reverse order
76
n ← tail
77
- while n = ø
+ while n != ø
78
yield n.value
79
n ← n.previous
80
0 commit comments