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
Grace [21]
3 years ago
7

Why do Selection Sort and Insertion Sort’s outer loops run 11 iterations if there are 12 elements in the array?

Computers and Technology
1 answer:
laiz [17]3 years ago
3 0

Answer:

The final case in selection sort is trivially sorted.

The final iteration in insertion sort is not needed.

Explanation:

For selection sort, you make sub arrays and find the smallest element placing it in the front and repeat until sorted.  This guarantees the final element will already be the greatest element, thus it is trivially sorted.

For Insertion sort, you use the initial element and compare it to the previous element and swap if the current is larger than the previous.  Using this sort, you will always perform n-1 comparisons where n is the total amount of elements in the array.  Thus, there are only 11 iterations for a 12 element array.

Cheers.

You might be interested in
PLEASE PLEASE PLEASE PLEASE HELP ASAP!!!!! I PROMISE I WILL GIVE YOU A BRAINLIEST FOR THE CORRECT ANSWER PLEASE HELP!!
inysia [295]
The answer will be C

As she is about to leave the position, in account of professionalism, she should NOT do any unnecessary harm to the current company, and  she should notify the company for necessary description before leaving. 
5 0
3 years ago
Read 2 more answers
Select the correct answer.
Dvinal [7]

Answer:

A

Explanation:

because when you make a presentation so you are already use technology

4 0
3 years ago
What is ransomware<br>я​
Novosadov [1.4K]

Answer:

Ransomware is malicious software that infects your computer and displays messages demanding a fee to be paid in order for your system to work again. It has the ability to lock a computer screen or encrypt important, predetermined files with a password.

Explanation:

:)

5 0
3 years ago
9- Write a program in MARIE to add three numbers.
Korvikt [17]

A series of instructions written in a programming language for a computer to follow is referred to as a computer program.

<h3>What is program?</h3>

Software, which also contains documentation and other intangible components, comprises computer programs as one of its components.

The source code of a computer program is the version that can be read by humans. Since computers can only run their native machine instructions, source code needs to be run by another software.

Using the language's compiler, source code may be converted to machine instructions. (An assembler is used to translate programs written in machine language.) An executable is the name of the generated file.

Therefore, A series of instructions written in a programming language for a computer to follow is referred to as a computer program.

To learn more about program, refer to the link:

brainly.com/question/11023419

#SPJ1

8 0
1 year ago
How to turn off location on iphone without person knowing
andrezito [222]

Answer:

airplane mode

Explanation:

5 0
3 years ago
Other questions:
  • The word computer consists of 64 bits, which is equivalent to _____ bytes.
    5·1 answer
  • A location in memory used for storing data and given a name in a computer program is called a because the data in the location c
    14·1 answer
  • I’m nobody. Who are you?
    9·2 answers
  • In presentation software, what is the way that text and pictures are arranged on a page called?
    10·1 answer
  • How Oracle 12c advances the security discussion?
    12·1 answer
  • Answer the following questions: • What is the source of the user’s request? Can a technical solution solve his problem? Perhaps
    10·1 answer
  • "If a user on a laptop complains that they are unable to sign into Windows even though they are certain they are entering the co
    12·1 answer
  • According to Caroline Heldman, what product was pulled from Abercrombie and Fitch stores based on protests through a blog
    11·1 answer
  • Having sound enhances your App, do you agree with this? Explain.
    9·1 answer
  • Which of the following is the key business objective behind the technologies implemented by PCL Construction, as discussed in th
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!