1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
sdas [7]
3 years ago
12

Give a recursive version of the algorithm Insertion-Sort (refer to page 18 in the textbook) that works as follows: To sort A[1..

n], we sort A[1..n − 1] recursively and then insert A[n] in its appropriate position. Write a pseudocode for this recursive version of InsertionSort and analyze its running time by giving a recurrence relation and solving it
Computers and Technology
1 answer:
Inga [223]3 years ago
3 0

Answer:

see explaination

Explanation:

void insertion( int e,int *x, int start, int end)

{

if (e >= x[end])

x[end+1] = e;

else if (start < end)

{

x[end+1] = x[end];

insertion(e, x, start, end-1);

}

else

{

x[end+1] = x[end];

x[end] = e;

}

}

void insertion_recurssion(int *b, int start, int end)

{

if(start < end)

{

insertion_sort_recur(b, start, end-1);

insertion(b[end], b, start, end-1);

}

}

void main()

{

insertion_recurssion(x,0,5);

}

You might be interested in
A content-managed site can be customized _____.
natita [175]

Good question. The best answer is that it all depends on your project's specifications. Here are a few scenarios where a custom CMS would make sense:

You have security concerns or corporate security requirements that would make off-the-shelf platforms unacceptable. An example of this could be stringent security requirements that limit the amount of software licenses allowed, or that require tightening so severe that it would inhibit the ability of the platform to operate correctly. Also, remember that off-the-shelf platforms are more susceptible to random attacks by bots and other automated attackers.

You require advanced features. If you plan on having a website requiring advanced customization, evaluate if you are pushing the limits of off-the-shelf CMS platforms. An example would be software that is core to your business that must be custom built on top of the CMS platform. Future risks could be the inability to run a proper software update, or even worse, a software update breaking your custom code. It happens all the time!

3 0
3 years ago
A media strategy that involves high ________ most likely involve creating broad exposure using many media vehicles, while a stra
Tom [10]

Answer: Reach and frequency

Explanation:

 The media strategy is the planning and action that basically involve high reach in the exposure by using the media vehicle. It basically improve the overall conversation rate of customers.

The conversation rate is refers to the total percentage of the users which involve using the website and various applications.

This strategy also involve with high frequency that limited the list of the media vehicle.

 

5 0
3 years ago
¿Cuáles son las dos ideas que confrontan en la "Revolución Tecnológica", cuando se refieren a la producción?
jeyben [28]

Answer:

._.  dont know spanish

Explanation:

6 0
3 years ago
What is the purpose behind the Three Phase Commit? It improves upon the two phased commit by requiring that locks be acquired at
Ray Of Light [21]
The answer is a) It improves upon the two-phased commit by requiring that locks be acquired at the start of a transaction.

Reason: The 3PC is an extension or you can say developed from 2PC that avoids blocking of an operation. It just ensures that first n sites have intended to commit a transaction that means it acquires commits or locks before the start of any transaction to avoid any blocking.

Option b) is wrong as it does not allow coordination, it just let all the other sites do their transaction if any other site is blocked, so no coordination is there between sites that they will wait till their coordinator is corrected.

Option c) is wrong as lock operations are shared between other connections as when their coordinator fails, the new coordinator agrees to the old coordinator that they had shared locks before and they can start their transaction.

Option d) is wrong as option a) is correct.

If you like the answer, please upvote.
4 0
2 years ago
The type of operating system best suited to controlling a massive multiplayer online game is _____.
Nina [5.8K]

Answer:

Distributed

Explanation:

5 0
3 years ago
Other questions:
  • I have a question about a hotel tv:
    10·1 answer
  • Computer-aided design software is used primarily by:
    13·1 answer
  • What makes smartphones so fragile?
    7·1 answer
  • To enter a typed number into a cell, you press Tab or Backspace?​
    7·2 answers
  • How fast is a backwards long jump in Super Mario 64?
    7·1 answer
  • Which printer are used to print text and graphics with high speed ​
    15·1 answer
  • Test if the word mold is stored in the variable word.
    5·1 answer
  • k-means clustering cannot be used to perform hierarchical clustering as it requires k (number of clusters) as an input parameter
    15·1 answer
  • There u go i did thereeeeeeeeeeeeeeeeeeeeeee
    13·2 answers
  • Which command os used to find a particular word in a document ?<br>​
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!