algorithm contains(headvalue prehead is the head node in the list value is the value to search for postthe item is either in the linked listtrueotherwise false head while and value value next end while if return false end if return true end contains deletion deleting node from linked list is straightforward but there are few cases we need to account for the list is emptyor the node to remove is the only node in the linked listor we are removing the head nodeor we are removing the tail nodeor the node to remove is somewhere in between the head and tailor the item to remove doesn' exist in the linked list the algorithm whose cases we have described will remove node from anywhere within list irrespective of whether the node is the head etc if you know that items will only ever be removed from the head or tail of the list then you can create much more concise algorithms in the case of always removing from the front of the linked list deletion becomes an ( operation