mirror of
https://github.moeyy.xyz/https://github.com/trekhleb/javascript-algorithms.git
synced 2024-12-26 23:21:18 +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
|
value is the value to search for
|
||||||
Post: the item is either in the linked list, true; otherwise false
|
Post: the item is either in the linked list, true; otherwise false
|
||||||
n ← head
|
n ← head
|
||||||
while n = ø and n.value = value
|
while n != ø and n.value != value
|
||||||
n ← n.next
|
n ← n.next
|
||||||
end while
|
end while
|
||||||
if n = ø
|
if n = ø
|
||||||
|
Loading…
Reference in New Issue
Block a user