Computer Science, asked by shrushtihampangouder, 5 months ago

3 write
algorithm to insert an element in an array

Answers

Answered by ridahussain86
3

\huge\bold\red{❤Answer❤}

A is an array N is number of elements (size) Element is a data element Pos is the location of the element to be inserted. Insertion (A, N, Element, Pos) Step 1: for i = N-1 downto Pos repeat step 2 Step 2: A[i+1] = A[i] End for Step 3: A [Pos] = Element Step 4: N = N + 1

Similar questions