subject

Select the correct text in the passage. Jessica has written the following insertion sort algorithm. In which line is she using the method that is inserting the values?
public class InsertionSort
private static void insertElem (int vals, int bottomPos)
int temp,
temp vals[bottomPos];
for (int i bottomPos 10, i
if (temp vals[I]) vals[i+1]temp return
vals[i+1]vals[i];
vals[0]temp;
return
public static void insSort(int vals)
for (int i 1, i insertElem(vals, i);
for (int k-0, k< vals. length, k++)
if (k < vals. length-1)
System. out. print(vals[k] +"");
else (
System. out. printin(vals[k]):
return
temp vals[bottomPos];
vals[i+1] -temp;
vals[i+1] - vals[i];
insertElem(vals, i);
System. out. println(vals[k]);

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 18:30
Given the following code: if (n == 2) { k -= 2; } else if (n == 3) { k -= 3; } can be rewritten as: if (< condition > ) { < assignment statement > ; } assume that evaluating < condition > does not change the values stored in n and k. which of the following could be used as < assignment statement > ? k -= n; k -= 1; k -= 2; k += n; k = n - k;
Answers: 2
question
Computers and Technology, 21.06.2019 20:20
Wireless communications is likely to be viewed as an essential part of an enterprise network infrastructure when: select one: a. mobile communication is needed b. communication facilities must be installed at low initial cost c. communication must take place in a hostile or difficult terrain that makes wired communication difficult or impossible d. the same information must be broadcast to many locations
Answers: 1
question
Computers and Technology, 22.06.2019 21:00
Describir textbook icon_person mira los dibujos y describe lo que está pasando. usa los verbos de la lista.
Answers: 1
question
Computers and Technology, 23.06.2019 07:00
To produce a starlight effect in her photograph, lina should choose the filter for her camera.
Answers: 1
You know the right answer?
Select the correct text in the passage. Jessica has written the following insertion sort algorithm....
Questions
question
Mathematics, 26.02.2021 02:10
question
Mathematics, 26.02.2021 02:10
question
Mathematics, 26.02.2021 02:10
question
Mathematics, 26.02.2021 02:10
question
Mathematics, 26.02.2021 02:10
question
Mathematics, 26.02.2021 02:10
question
Biology, 26.02.2021 02:10
Questions on the website: 13722361