#Given a linked list which is sorted, insert a linked while maintaining sort


from classes import Node, LinkedList
# Driver program
llist = LinkedList()
new_node = Node(5)
llist.sortedInsert(new_node)
new_node = Node(10)
llist.sortedInsert(new_node)
new_node = Node(7)
llist.sortedInsert(new_node)
new_node = Node(3)
llist.sortedInsert(new_node)
new_node = Node(1)
llist.sortedInsert(new_node)
new_node = Node(9)
llist.sortedInsert(new_node)
new_node = Node(2)
llist.sortedInsert(new_node)
print("Create Linked List")
llist.printList()
b2896a03e4ed1b53841c6d55fe658c6d9c9f91d2
<mask token>

<mask token>
llist.sortedInsert(new_node)
<mask token>
llist.sortedInsert(new_node)
<mask token>
llist.sortedInsert(new_node)
<mask token>
llist.sortedInsert(new_node)
<mask token>
llist.sortedInsert(new_node)
<mask token>
llist.sortedInsert(new_node)
<mask token>
llist.sortedInsert(new_node)
print('Create Linked List')
llist.printList()

<mask token>
llist = LinkedList()
new_node = Node(5)
llist.sortedInsert(new_node)
new_node = Node(10)
llist.sortedInsert(new_node)
new_node = Node(7)
llist.sortedInsert(new_node)
new_node = Node(3)
llist.sortedInsert(new_node)
new_node = Node(1)
llist.sortedInsert(new_node)
new_node = Node(9)
llist.sortedInsert(new_node)
new_node = Node(2)
llist.sortedInsert(new_node)
print('Create Linked List')
llist.printList()

from classes import Node, LinkedList
llist = LinkedList()
new_node = Node(5)
llist.sortedInsert(new_node)
new_node = Node(10)
llist.sortedInsert(new_node)
new_node = Node(7)
llist.sortedInsert(new_node)
new_node = Node(3)
llist.sortedInsert(new_node)
new_node = Node(1)
llist.sortedInsert(new_node)
new_node = Node(9)
llist.sortedInsert(new_node)
new_node = Node(2)
llist.sortedInsert(new_node)
print('Create Linked List')
llist.printList()

#Given a linked list which is sorted, insert a linked while maintaining sort


from classes import Node, LinkedList
# Driver program
llist = LinkedList()
new_node = Node(5)
llist.sortedInsert(new_node)
new_node = Node(10)
llist.sortedInsert(new_node)
new_node = Node(7)
llist.sortedInsert(new_node)
new_node = Node(3)
llist.sortedInsert(new_node)
new_node = Node(1)
llist.sortedInsert(new_node)
new_node = Node(9)
llist.sortedInsert(new_node)
new_node = Node(2)
llist.sortedInsert(new_node)
print("Create Linked List")
llist.printList()