linked structures linear search the linear search for use with the linked list can be modified to take advantage of the sorted items the only change required is to add second condition that terminates the loop early if we encounter value larger than the target the search routine for sorted linked list is shown in listing listing searching sorted linked list def sortedsearchheadtarget curnode head while curnode is not none and curnode data target if curnode data =target return true else curnode node next return false inserting nodes adding new node to an unsorted linked list is simple because we can simply add it to the front or end of the list since its placement is not important when adding node to sorted listhoweverthe correct position for the new value must be found and the new node linked into the list at that position the python implementation for inserting value into sorted linked list is provided in listing as with the removal operation for the unsorted listwe must position two temporary external references by traversing through the linked list searching for the correct position of the new value the only difference is the loop termination condition to insert new nodewe must terminate the loop upon finding the first value larger than the new value being added listing inserting value into sorted list given the head pointerinsert value into sorted linked list find the insertion point for the new value prednode none curnode head while curnode is not none and value curnode data prednode curnode curnode curnode next create the new node for the new value newnode listnodevalue newnode next curnode link the new node into the list if curnode is head head newnode else prednode next newnode