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
What does ""fair use"" mean regarding copyrighted works?
Nady [450]

In regards copyrighted works, fair use is simply known as legal dogma that allows the right to free expression by allowing the unlicensed use of copyright-protected works by individuals as regards to some certain situations.

Fair Use of copying of copyrighted material can only be used in a short and revelatory us, example to criticize, or caricature of a copyrighted work. It is often known to be a legal defense that protects individuals of copyrighted material from copyright infringement.

  • Fair use allows a person/people to use a copyrighted work without acknowledgement or permission of copyright owner and it can be used  to criticize, comment, news reporting, teaching, research etc. It is not seen as infringement under the law.

Conclusively, we can say that In regards copyrighted works, fair use is simply known as legal dogma that allows the right to free expression by allowing the unlicensed use of copyright-protected works by individuals as regards to some certain situations.

Learn more from:

brainly.com/question/1534807

5 0
2 years ago
What changes should be made in OSI model(Open System Interconnection).
saveliy_v [14]

Answer:

Explanation:

When most non-technical people hear the term “seven layers”, they either think of the popular Super Bowl bean dip or they mistakenly think about the seven layers of Hell, courtesy of Dante’s Inferno (there are nine). For IT professionals, the seven layers refer to the Open Systems Interconnection (OSI) model, a conceptual framework that describes the functions of a networking or telecommunication system.

The model uses layers to help give a visual description of what is going on with a particular networking system. This can help network managers narrow down problems (Is it a physical issue or something with the application?), as well as computer programmers (when developing an application, which other layers does it need to work with?). Tech vendors selling new products will often refer to the OSI model to help customers understand which layer their products work with or whether it works “across the stack”.

Layer 7 - Application

To further our bean dip analogy, the Application Layer is the one at the top--it’s what most users see. In the OSI model, this is the layer that is the “closest to the end user”. It receives information directly from users and displays incoming data it to the user. Oddly enough, applications themselves do not reside at the application layer. Instead the layer facilitates communication through lower layers in order to establish connections with applications at the other end. Web browsers (Google Chrome, Firefox, Safari, etc.) TelNet, and FTP, are examples of communications  that rely  on Layer 7.

Layer 6 - Presentation

The Presentation Layer represents the area that is independent of data representation at the application layer. In general, it represents the preparation or translation of application format to network format, or from network formatting to application format. In other words, the layer “presents” data for the application or the network. A good example of this is encryption and decryption of data for secure transmission - this happens at Layer 6.

4 0
2 years ago
Read 2 more answers
Which network type uses a coaxial cable to receive its signal?.
olchik [2.2K]

Answer:

fiber optic

Explanation:

thanks youuuui

6 0
2 years ago
What is true about content based filtering
AleksAgata [21]

Answer: provide more info

Explanation:

8 0
3 years ago
Which of the following is NOT an algorithm?
Nata [24]

Answer:

d) rolling a pair of dice in monopoly

Explanation:

an algorithm is a process or set of rules followed in a particular order to perform a certain task. all of the other answers are a set of instructions that lead to something except for rolling a pair of dice. rolling a pair of dice can be a part of instruction but its not a process in itself.

hope this makes sense!

3 0
3 years ago
Other questions:
  • 1.6.6 Night out for codehs
    6·1 answer
  • Sniffing network and wireless traffic, intercepting bluetooth traffic, and even using equipment to remotely pull information fro
    12·1 answer
  • A(n) _____ is a type of man-in-the-middle attack where an attacker captures the data that is being transmitted, records it, and
    15·2 answers
  • If you cause a car accident, which type of insurance will require you to pay the least out of pocket?
    5·2 answers
  • What is an Apple Pen?
    5·2 answers
  • In news writing, which is bigger , a topic or a angle
    10·1 answer
  • What would be an ideal scenario for using edge computing solutions?
    10·1 answer
  • The Review tab in Microsoft Publisher provides two groupings called _____. Proofing and Language Spell Check and Research Proofi
    6·1 answer
  • Any looping construct can be nested inside another loop is known as
    11·1 answer
  • How is knowing how to use word or docs importamt?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!