mirror of
https://github.moeyy.xyz/https://github.com/trekhleb/javascript-algorithms.git
synced 2024-12-26 23:21:18 +08:00
Fix LinkedList pseudo-code (issue #191).
This commit is contained in:
parent
af64d12a23
commit
a8d7435b8d
@ -76,10 +76,10 @@ Remove(head, value)
|
|||||||
end if
|
end if
|
||||||
return true
|
return true
|
||||||
end if
|
end if
|
||||||
while n.next = ø and n.next.value = value
|
while n.next != ø and n.next.value != value
|
||||||
n ← n.next
|
n ← n.next
|
||||||
end while
|
end while
|
||||||
if n.next = ø
|
if n.next != ø
|
||||||
if n.next = tail
|
if n.next = tail
|
||||||
tail ← n
|
tail ← n
|
||||||
end if
|
end if
|
||||||
|
Loading…
Reference in New Issue
Block a user