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 help me and solution in c language​
salantis [7]
Ummmm the solution is ummm brb
3 0
2 years ago
A(n) _____ might be written by a programmer or it might be created through a DBMS utility program.
valkas [14]

Answer:

The correct answer to the following question will be "Application program".

Explanation:

  • Applications include database programs, word processors, browsers, development tools, picture editors, and platforms for communication.
  • It use the OS (Operating System) of the computer and many other assisting programs, frequently system software, to work.
  • An application program is a detailed, body-contained program that directly works a given function for just the user.

There are some examples of application programs such as:

  • Includes various bundled software.
  • Addresses an organization's data management and application requirements, covering all divisions.
  • It allows users can create and manage information.
  • Used primarily to get content access without editing.

6 0
3 years ago
Hello! I am a new coder, so this is a simple question. But I am trying to create a code where you enter a number, then another n
slavikrds [6]

no longer returns an error but your math seems to have something wrong with it, always returns 0

Console.WriteLine("Enter a percentage here");

   int Percent = int.Parse(Console.ReadLine());

   Console.WriteLine("Enter your number here");

   int Number = int.Parse(Console.ReadLine());

   int result = Percent / 100 * Number;

6 0
2 years ago
Which tool is used to create a basic web page using HTML?
GuDViN [60]

Answer:

A text editor

Explanation:

A text editor is an application that enables a programmer edit and create codes in a programming language. These codes are then executed to do just what the programmer wanted them to do.

5 0
2 years ago
Read 2 more answers
Your manager asks you to get details on a computer crash. What Windows Administration Tool could you use?
Law Incorporation [45]
  • The answer is "Option C" because the WMD is a freeware memory test software that works excellently.
  • It is a comprehensive math question, and it is also quite straightforward to use.
  • They suggest that you first test your ram with Memtest86, but you really should always test a second time with a different memory testing application to be certain.
  • Microsoft Windows Diagnostic is the second tool, that scans your laptop's physical memory & identifies any faults.
  • It requires a reboot to be used the system that will restart, and you'll be unable to your mouse in the Memory Diagnostic Tool.

The wrong choices can be defined as follows:

  • In option a, it is wrong because the data warehouse transforms data into information that may be used by an organization's decision-making process.
  • In option b, it is wrong because by using Metrics Collector Groups and logging the data, it was able to display real-time market data as well as collect and store data.
  • In option d, it is wrong because this is a tool used in Windows, which displays detailed information about major events that have taken place on your machine.
  • In option e, it is wrong because messages and trace logs could be viewed and sorted using the Log Viewer.

Learn more:

Memory Diagnostic: brainly.com/question/13606234

3 0
3 years ago
Read 2 more answers
Other questions:
  • In a(n) __________ situation, a wireless device is configured to appear to be a legitimate access point, enabling the operator t
    14·1 answer
  • Explain why testing can only detect the presence of errors, not their absence.
    14·1 answer
  • Many languages do not use the characters of U.S. English. Suppose you wanted to be able to
    15·1 answer
  • What is the name of the unique identifier assigned to any personal computer that is connected to the internet?
    11·1 answer
  • Give 4 examples of mnemonic codes, and what do they do?
    15·1 answer
  • What type of technology we need to use in order to make sure that users can freely room from one room to another one without wi-
    14·1 answer
  • Why use LinkedIn automation for LinkedIn?
    10·1 answer
  • What is required to become a good critical thinker? Use a process when dealing with a big issue. Practice the right skills over
    9·1 answer
  • Which option is created specifically for giving a slide presentation in front of an audience and works when the speaker is utili
    14·1 answer
  • What is the correct sequence in which a computer operates​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!