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
Identify the function for the following computer part: Printer Question 23 options: Input
Anastasy [175]
24 is processing because it process info 
5 0
4 years ago
You need to pay an Internet Service Provider (ISP) for services rendered. Which payment technology would you use?
-Dominant- [34]

Answer:

D. Electronic Funds Transfer (EFT)

Explanation:

e-commerce is a short for electronic commerce and it can be defined as a marketing strategy that deals with meeting the needs of consumers, by selling products or services to the consumers over the internet.

This ultimately implies that, e-commerce is strictly based on the buying and selling of goods or services electronically, over the internet or through a digital platform. Also, the payment for such goods or services are typically done over the internet such as online payment services.

A payment gateway can be defined as a merchant service technology used for the capturing, acceptance and transfer of digital payment from the bank account of a customer (buyer) to the bank account of the merchant (seller). Thus, payment gateway typically involves the use of credit or debit card for the payment of goods purchased or services provided.

In this scenario, you need to pay an Internet Service Provider (ISP) for services rendered. Thus, the payment technology which you would use is Electronic Funds Transfer (EFT).

3 0
3 years ago
What is the name of the file manager in microsoft windows?
Ivan
It is called Windows Explorer referred as explorer.exe<span />
7 0
4 years ago
Read 2 more answers
There are many reasons to convert to the decimal numbering system. Select the best answer. When checking numeric values in compu
ludmilkaskok [199]

Answer:

first statement makes most sense.

Explanation:

When checking numeric values in computer memory, decimal makes sense because you use decimal numbering every day. --> sounds OK.

When checking words in computer memory, decimal makes sense because you use decimal numbering every day.  --> doesn't make sense

When comparing values in a computer program, decimal numbering makes sense because it is always shorter than hexadecimal. --> Not true

When checking words in computer memory, decimal numbering makes sense because it is easier than hexadecimal. --> Hexadecimal would be easier when inspecting computer words, because you can easily see the byte alignment of the values.

4 0
3 years ago
Read 2 more answers
What economic impact will this disaster have on people? Select three options.
Naily [24]

Answer:

1, 3, and 4

Explanation:

Those are the only ones that has anything to do with money.

7 0
2 years ago
Other questions:
  • Why we can not see objects around us in the dark​
    6·1 answer
  • Write a recursive program that requests an answer to the question "Are we there yet?" using an input statement and terminates if
    10·1 answer
  • With a ____ indent, all lines except the first line of the paragraph are indented from the left margin.
    12·1 answer
  • The guy wire BD exerts on the telephone pole AC a force P directed along BD. Knowing that P must have a 720-N component perpendi
    10·1 answer
  • True or Flase
    15·1 answer
  • A user reports his or her computer is slow to boot. You check the boot order and determine that the computer is checking the C d
    8·1 answer
  • Which of the following areas of study have been instrumental in shaping the development of HCT?
    6·1 answer
  • Is it possible to build something that doesn't exist yet?
    14·1 answer
  • Exampels of semantic tags ?​
    7·1 answer
  • 16 POINTS
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!