if curr2 lies in between curr1 and next1 then do curr1 . curr2 . next1
if ( ( curr2 . data ) >= ( curr1 . data ) and ( curr2 . data ) <= ( next1 . data ) ) : NEW_LINE INDENT next2 = curr2 . next NEW_LINE curr1 . next = curr2 NEW_LINE curr2 . next = next1 NEW_LINE DEDENT