Computer system analysis is like child-rearing; you can do grievous damage, but you cannot ensure success. Tom DeMarco

Insertion sort using Linked list

Language Java | Level Intermediate | Category Data structure | August 30, 2015 5:40 pm


Data structure Description

Insertion sort is a sorting algorithm uses to sort items in the array or linked list. It can sort the elements in ascending order or descending order. Insertion sort is a simple sorting algorithm. It works efficiently for small data sets. Insertion sort builds the sorted array. It is best suitable for nearly sorted arrays and a small set of elements.

Write a program to sort the elements in the linked list using insertion sort.


Output

   					 
Print the list of items: 21->52->33->67->NULL

				    

Comments


No comments available!

Please login to add comments.