Write the Linear Search algorithm for linked lists!
Pair up!
Write pseudocode for this problem!
Now write the code for this algorithm. You can use repl.it or some other environment to run and test code.
The function you write should accept as parameters linked list and a value you want to find. The function should return the node of the found value, and null if not found.
def search(list):
current = list.head
found = False
while current and found is False:
if current.data() == data:
found = True
else:
current = current.next
if current is None:
return null
return current