Insert Element into Unsorted Array
Insertion
Insertion is the process of inserting an element or elements into the list.
In an unsorted list the element is inserted at the end of the list but if the list is sorted
then the element is inserted at its proper position (in order) and the elements after that
are moved down.
Array ‘A’ of size 11 containing 8 elements
A[0] A[1] A[2] A[3] A[4] A[5] A[6] A[7] A[8] A[9] A[10]
44 15 26 21 28 10 8 16
Status of the array after inserting the element 4
Insertion is done At the end ( in an unsorted array ) :
A[0] A[1] A[2] A[3] A[4] A[5] A[6] A[7] A[8] A[9] A[10]
44 15 26 21 28 10 8 16 4 ↑
inserted here
Description
Insert an Element into an Unsorted Array
Presentation Transcript
Your Facebook Friends on WizIQ