answersLogoWhite

0

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

13y ago

What else can I help you with?

Continue Learning about Engineering

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 occurs when a new user applies an existing innovation developed for one purpose in a different function?

When a new user applies an existing innovation developed for one purpose to a different function, it often leads to what's known as "recontextualization." This process can result in novel applications and solutions, potentially uncovering new markets or enhancing the original innovation's value. Such creative repurposing can drive further innovation and adaptability, as well as stimulate economic growth by addressing unmet needs in diverse contexts.


How can you write an algorithm for getting autoformic numbers?

Perhaps you mean an automorphic number? Loop through a series of numbers - for example, all numbers from 1 to 10,000 - and check each of the numbers, whether the condition applies. The condition in this case is that if you square the number, the last digits represent the original number.


What do you call a person who studies and applies technology?

Technologist.


Which of the sorting algorithms has the lowest worst-case complexity?

The sorting algorithm with the lowest worst-case time complexity is Merge Sort, which operates at O(n log n). This efficiency applies regardless of the input data's initial order, making it a reliable choice for large datasets. Other algorithms, such as Quick Sort and Heap Sort, also have O(n log n) worst-case complexity, but Merge Sort is particularly noteworthy for its stable sorting properties.

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


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.


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.


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.


What occurs when a new user applies an existing innovation developed for one purpose in a different function?

When a new user applies an existing innovation developed for one purpose to a different function, it often leads to what's known as "recontextualization." This process can result in novel applications and solutions, potentially uncovering new markets or enhancing the original innovation's value. Such creative repurposing can drive further innovation and adaptability, as well as stimulate economic growth by addressing unmet needs in diverse contexts.


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 is the algorithm for area of parallelogram?

The area of a parallelogram can be calculated using the formula: Area = base × height. Here, the base is the length of one side of the parallelogram, and the height is the perpendicular distance from that base to the opposite side. This formula applies regardless of the angles or side lengths, as long as the height is known.