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

Homework: Insertion Sort

Computers and Technology
1 answer:
Serga [27]3 years ago
3 0

Answer:

Explanation:

I have written the code in Java. It contains the class Insertion Sorter which has the InsertionSort function. This function uses the insertion sort algorithm to sort a comparable array and if it fails to do so for whatever reason it throws an Illegal ArgumentException. If it sorts the array correctly it returns the number of changes that needed to be made in order to correctly sort the array. Due to technical difficulties I have attached the code as a text document below and proof of output in the picture below as well.

You might be interested in
How long does a baby dolphin stay with its mum
g100num [7]
The nursing usually takes up to 18 months, i.e. one year and a half.

The baby dolphin may however remain with his mum for up to 3-6 years.
5 0
3 years ago
_______ is identical to the conventional typewriter keyboard
NeX [460]

Answer:

A

Explanation:

:)

4 0
3 years ago
Read 2 more answers
If you attempt an edgeunity quiz is your latest attempt the one counted?
tekilochka [14]

Answer:

Hello

Explanation:

Hello profile picture of a nub how are you doing today?

8 0
3 years ago
how do you call the squares method to compute the first five squares and store the result in an array numbers
IRINA_888 [86]

Answer:

The method can be called using:

int[] returnarray = Squares();

<em>Where returnarray represents the name of the array</em>

Explanation:

To answer this, I will make an assumption that the Square method is an int array method (i.e. it returns array).

So, to call the method from main, an array has to be declared to get the values:

int[] returnarray = Squares();

Then an iteration is created to iterate through the array in order to print the array elements.

for (int i = 0; i < returnarray.length; i++)

 System.out.print(returnarray[i]+ " ");    

-------------------------------------------------------------------------------------------

The answer ends here

-------------------------------------------------------------------------------------------

As an addition, the complete program that includes the method and the main is:

<em>public class Main{</em>

<em> public static int [] Squares(){</em>

<em>     int [] arr = new int[5]; </em>

<em>     for(int i = 1;i<6;i++){</em>

<em>         arr[i-1] = i*i;</em>

<em>     }</em>

<em>     return arr;</em>

<em> }</em>

<em> public static void main(String[] args) {</em>

<em>  int[] returnarray = Squares();</em>

<em>  for (int i = 0; i < returnarray.length; i++)</em>

<em>  System.out.print(returnarray[i]+ " ");          </em>

<em> }  </em>

<em>}</em>

8 0
3 years ago
Using MRTG, Ntop, and SNMPC to collect flow data from your routers and switches to identify traffic/packet anomalies is an examp
laiz [17]

Is an example of reactive, signature based IDS/IPS

Reactive, signature based IDPS technology is one of the many methodologies used to detect attacks. In a signature based IDS, a misuse detection identifies intrusions by watching for patterns of traffic and compare them against observed events or a database of signatures from known threats. Reactive IDS/IPS, on the other hand, will not only detect and alert malicious traffic but also take pre-defined proactive actions. Using MRTG, Ntop, and SNMPC in routers will monitor traffic and help network managers easily see issues like DOS attacks and security problems.


3 0
3 years ago
Read 2 more answers
Other questions:
  • When reading a ____ language, we use our understanding of the richness of the language's vocabulary to extract the meaning. geop
    10·1 answer
  • Which device or software application detects errors in system configurations?
    8·1 answer
  • When RadioButton objects are contained in a group box, the user can select only one of the radio buttons on the panel.
    12·1 answer
  • Union Carbide accident safety policies and procedures were not followed was due to
    14·1 answer
  • Assume the existence of an UNSORTED ARRAY of n characters. You are to trace the CS111Sort algorithm (as described here) to reord
    14·1 answer
  • which of the following statements about servers is correct A. servers are computers on a network that share their resources with
    12·2 answers
  • I really want to know the best way to deal as much heart as possible plz tell me
    7·2 answers
  • Derive the three-dimensional transformation matrix for scaling an object by a scaling factor s in a direction defined by the dir
    15·1 answer
  • Why is monitor called softcopy output device?​
    6·1 answer
  • ¿ El Parque Fray y Jorge es un patrimonio Cultural/Natural o patrimonial de Chile ?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!