answersLogoWhite

0


Best Answer

Algorithm for Inserting(by Md.Asif Rahman BBA(MIS) University of Dhaka

Insert(a[],n, loc, item)

{

for(i=(n-1), i>(loc-2), i--)

a[i+1]=a[i]

a[loc-1]=item

n++

}

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write an algorithm for inserting data into an array so that existing data is moved up one position to make room for the new data Write a program that applies the algorithm?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Who is an adaptive entrepreneure?

this only applies existing tools in organizing using and controlling economic activities


What is mean by complexity in c plus plus programming?

Complexity is a measure of how long an algorithm is expected to take and/or how much space is required to complete the task. It is not specific to C++ -- the language is immaterial -- it only applies to algorithms. Complexity is often expressed in big O notation, where O(1) is constant time (the best that can be expected of any algorithm).


What is adaptive mode in Strategic Management?

a stage of firm development where strategic decisions are closely linked to the firm's existing strategy; usually applies to medium sized firms.


Is it applies to or applies for?

it applies to


Which governor component applies force to the throttle shaft in an effort to move it to the wide open throttle position?

governed idle spring


What does rebelliousness mean?

Rebellious applies to someone who rebels, someone who refuses to follow existing rules, to obey instructions, to recognize authority, or to conform to established values.Rebellious applies directly to those in a rebellion : a revolution, coup, or insurrection against an existing government or ruler.


How do i pick up women?

You simply have to grab her in the most comfortable position, and start lifting up, that is how you pick up women. Same applies to anything you can carry.


Objective for your resume you are a biology science graduate?

The objective of a resume for any position is to show your suitability for the position offered. Use the description of the opening to tailor your information to suit it. Use the skills and experience that applies to this position, don't make things up. Don't overpower your resume with a lot of information that is not applicable to this position; if the recipient can't find the information pertaining to the position quickly, they will go on to the next resume.


Is this how you spell applies?

Yes, applies is the correct spelling.Some example sentences are:She applies to the local university.The same rule applies to you as well, Benjamin.The doctor applies a bandage to my wound.


What is the national color of New Zealand?

The national colour is black. This applies mainly to sport. The flag of New Zealand is mostly blue, representing its position in the Pacific Ocean.


An inconsistency that occurs in thinking about a moral standard of an in group which applies universally while at the same time maintaining the position that it doesn't apply to groups who do not acce?

Relativist Fallacy


What are two ways electric circuits can be arranged?

Electric circuits with 2 terminals can be arranged in "series" or in "parallel". This applies to all 2-terminal circuits - including fundamental components such as resistors, capacitors, or inductors. The term "series" means that an electrical path in an existing circuit is broken and the circuit is connected to the 2 terminals of the break. The term "parallel" means that the electric circuit is connected between 2 existing terminals or nodes of the existing circuit.