Computer Science, asked by shashwat620, 1 year ago

Write an algorithm to insert an element at the specific position in an array

Answers

Answered by chandusrujan17oxlyug
12
We assume A is an array with N elements. The maximum numbers of elements it can store is defined by nMAX. We shall first check if an array has any empty space to store any element and then we proceed with the insertion process.
begin

IF N = MAX, return
ELSE
N = N + 1

For All Elements in A
Move to next adjacent location

A[FIRST] = New_Element

I hope it is helpful.
PLEASE mark me as brainleist answer PLEASE.
Similar questions