File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/data-structures/doubly-linked-list Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ Add(value)
1919 Pre: value is the value to add to the list
2020 Post: value has been placed at the tail of the list
2121 n ← node(value)
22- if head = ø
22+ if head ! = ø
2323 head ← n
2424 tail ← n
2525 else
@@ -51,14 +51,14 @@ Remove(head, value)
5151 return true
5252 end if
5353 n ← head.next
54- while n = ø and value !== n.value
54+ while n ! = ø and value !== n.value
5555 n ← n.next
5656 end while
5757 if n = tail
5858 tail ← tail.previous
5959 tail.next ← ø
6060 return true
61- else if n = ø
61+ else if n ! = ø
6262 n.previous.next ← n.next
6363 n.next.previous ← n.previous
6464 return true
@@ -74,7 +74,7 @@ ReverseTraversal(tail)
7474 Pre: tail is the node of the list to traverse
7575 Post: the list has been traversed in reverse order
7676 n ← tail
77- while n = ø
77+ while n ! = ø
7878 yield n.value
7979 n ← n.previous
8080 end while
You can’t perform that action at this time.
0 commit comments