mirror of
https://github.moeyy.xyz/https://github.com/trekhleb/javascript-algorithms.git
synced 2024-12-25 22:46:20 +08:00
Fixed Contains operation pseudo code (#180)
This commit is contained in:
parent
b1f31cd067
commit
20497bb044
@ -46,7 +46,7 @@ Contains(head, value)
|
||||
value is the value to search for
|
||||
Post: the item is either in the linked list, true; otherwise false
|
||||
n ← head
|
||||
while n = ø and n.value = value
|
||||
while n != ø and n.value != value
|
||||
n ← n.next
|
||||
end while
|
||||
if n = ø
|
||||
|
Loading…
Reference in New Issue
Block a user