learnMore-algorithm/src/main/java/com/learn/leetcode/LinkedlistIS.java
// Driver program to test above functions 
Driver program to test above functions
Driver program to test above functions
public static void main(String[] args) 
	{ 
		LinkedlistIS list = new LinkedlistIS(); 
		list.push(5); 
		list.push(20); 
		list.push(4); 
		list.push(3); 
		list.push(30); 
		System.out.println("Linked List before Sorting.."); 
		list.printlist(list.head); 
		list.insertionSort(list.head); 
		System.out.println("\nLinkedList After sorting"); 
		list.printlist(list.head); 
	}
public static void main ( String [ ] args ) { LinkedlistIS list = new LinkedlistIS ( ) ; list . push ( 5 ) ; list . push ( 20 ) ; list . push ( 4 ) ; list . push ( 3 ) ; list . push ( 30 ) ; System . out . println ( "Linked List before Sorting.." ) ; list . printlist ( list . head ) ; list . insertionSort ( list . head ) ; System . out . println ( "\nLinkedList After sorting" ) ; list . printlist ( list . head ) ; }
Driver program to test above functions
Driver program to test above functions