Data Structures Lab Manual / Data Structures Insertion Sort C Program

Program Name: Write a C Program for Insertion Sort in Data Structures
Theory
Insertion sort in virtually splits the given array into sorted and unsorted parts, then the values from the 
unsorted parts are picked and placed at the correct position in the sorted part.
Program Code



Input:
Enter Number of Elements: 5
Enter Array Elements: 5 2 9 7 1
Output:
Data After Insertion Sort: 	1	2	5	7	9


Home     Back