Skip to content

Linked List: Searching

Task: Find 30 in this list

head10203040∅RESULT3nodes visitedfound after 2 pointers were followed

What you are watching

Searching a linked list is traversal that stops early. Each node is compared with the target and, if it does not match, the next pointer is followed. 30 sits third, so it costs three steps to reach - and no arrangement of the values would help, because a linked list cannot jump to the middle to begin a binary search.