mirror of
https://github.com/trekhleb/javascript-algorithms.git
synced 2025-07-06 01:15:56 +08:00
Fix LinkedList pseudo-code (issue #191).
This commit is contained in:
@ -76,10 +76,10 @@ Remove(head, value)
|
||||
end if
|
||||
return true
|
||||
end if
|
||||
while n.next = ø and n.next.value = value
|
||||
while n.next != ø and n.next.value != value
|
||||
n ← n.next
|
||||
end while
|
||||
if n.next = ø
|
||||
if n.next != ø
|
||||
if n.next = tail
|
||||
tail ← n
|
||||
end if
|
||||
|
Reference in New Issue
Block a user