diff --git a/src/data-structures/doubly-linked-list/README.md b/src/data-structures/doubly-linked-list/README.md index 48a5e885..ad7f2774 100644 --- a/src/data-structures/doubly-linked-list/README.md +++ b/src/data-structures/doubly-linked-list/README.md @@ -66,14 +66,14 @@ Remove(head, value) return true end if n ← head.next - while n = ø and value !== n.value + while n != ø and value !== n.value n ← n.next end while if n = tail tail ← tail.previous tail.next ← ø return true - else if n = ø + else if n != ø n.previous.next ← n.next n.next.previous ← n.previous return true @@ -89,7 +89,7 @@ ReverseTraversal(tail) Pre: tail is the node of the list to traverse Post: the list has been traversed in reverse order n ← tail - while n = ø + while n != ø yield n.value n ← n.previous end while