Assume that list is a singly linked list with more than 1 element and identified by a pointer to its head.
What does the following pseudocode do with list?
Function foo( head, x ):
p <- head
IF NOT(p = NULL) AND p.info = x THEN
head = p.next
WHILE NOT (p = null OR p.next = NULL)
IF p.next.info = x
p.next = p.next.next
ELSE p = p.next
x Turn on thread page Beta
What does the following pseudocode do with list? Singly linked list watch
- Thread Starter
- 31-10-2015 14:17