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
Which of the following is the correct order for arranging these titles in a subject filing system? A. Applications, Banking Serv
Ket [755]

Answer:

The correct answer is option (A) Applications, Banking Services, Customer Service

Explanation:

Solution

Methods of filing

There are 5 methods of filing:

• Filing by Subject/Category

• Filing in Alphabetical order

• Filing by Numbers/Numerical order

• Filing by Places/Geographical order

• Filing by Dates/Chronological order

In this case, we can fill by Alphabetical order which is given below

Applications, Banking Services, Customer Service

7 0
3 years ago
A(n) __________ is a set of technologies used for exchanging data between applications and for connecting processes with other s
Harrizon [31]

Answer:

The answer is "Option ".

Explanation:

The SOA stands for "Service-Oriented Architecture", which is primarily known as a service set and these services enable you to communicate with each other. In the communication, it may require simple data to transfer to two or more services, which can be organized by those operations, and other options were incorrect, that can be explained as follows:

  • In option a, It is a business software, which is used to organized data, that's why it is wrong.
  • Option b and Option d both are wrong because the mashup process is used only on web services, which is not a part of SOA , that's why it is wrong.
5 0
3 years ago
Read 2 more answers
What is your favorite film and what makes it good?
Gala2k [10]

Answer:

My Favorite film is The Old Guard

Explanation:

I like The Old Guard because it has action an etc.

4 0
2 years ago
Read 2 more answers
Explain block diagram of. computer architure​
ozzi

Answer:

A block diagram is a diagram of a system in which the principal parts or functions are represented by blocks connected by lines that show the relationships of the blocks. They are heavily used in engineering in hardware design, electronic design, software design, and process flow diagrams.

Explanation:

In your question you asked architure but maybe it is architecture (•;

5 0
2 years ago
Put the steps in order to produce the output shown below. Assume the indenting will be correct in the program.
FromTheMoon [43]
For numb in [5,8]:
for numa in [2,3]:
print(str(numb) + str(numa))
3 0
2 years ago
Other questions:
  • Somebody who is good at this stuff, please halp meh ;-;
    6·1 answer
  • This operator represents the logical AND.
    7·1 answer
  • On many advanced routers and switches, you can implement QoS through bandwidth management, such as __________, where you control
    5·1 answer
  • Match each scenario to the absolute value expression that describes it. 1. the distance moved when going backwards five spaces i
    13·2 answers
  • Website administrators relay on ______, which is data such as the number of users who commented on, shared, viewed, or liked web
    7·2 answers
  • I WILL GIVE BRAINLIEST TO WHO ANSWERS FIRST AND CORRECTLY.
    12·1 answer
  • Calculator and clocks are examples of -------------- in windows 7
    14·1 answer
  • There is a feature that allows you to lock the document, to avoid others making changes. True or False
    6·1 answer
  • Many ____ classes for certification are available on the Internet and by many companies that have set up intranets within their
    15·1 answer
  • Which one of these are a valid IPv4 address?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!