data structures using advantages of insertion sort the advantages of this sorting algorithm are as followsit is easy to implement and efficient to use on small sets of data it can be efficiently implemented on data sets that are already substantially sorted it performs better than algorithms like selection sort and bubble sort insertion sort algorithm is simpler than shell sortwith only small trade-off in efficiency it is over twice as fast as the bubble sort and almost per cent faster than the selection sort it requires less memory space (only ( of additional memory spaceit is said to be onlineas it can sort list as and when it receives new elements programming example write program to sort an array using insertion sort algorithm #include #include #define size void insertion_sort(int arr[]int )void main(int arr[size]inprintf("\ enter the number of elements in the array")scanf("% "& )printf("\ enter the elements of the array")for( = ; < ; ++scanf("% "&arr[ ])insertion_sort(arrn)printf("\ the sorted array is\ ")for( = ; < ; ++printf(% \ "arr[ ])getch()void insertion_sort(int arr[]int nint ijtempfor( = ; < ; ++temp arr[ ] - while((temp = )arr[ + arr[ ] --arr[ + tempoutput enter the number of elements in the array enter the elements of the array the sorted array is selection sort selection sort is sorting algorithm that has quadratic running time complexity of ( )thereby making it inefficient to be used on large lists although selection sort performs worse than insertion sort algorithmit is noted for its simplicity and also has performance advantages over