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
Rama09 [41]
3 years ago
8

Consider the following list. list = {24, 20, 10, 75, 70, 18, 60, 35} Suppose that list is sorted using the selection sort algori

thm as discussed in the book. What is the resulting list after two passes of the sorting phase; that is, after two iterations of the outer for loop? list = {10, 18, 24, 20, 75, 70, 60, 35} list = {10, 18, 20, 24, 75, 70, 60, 35} list = {10, 18, 24, 75, 70, 20, 60, 35} list = {10, 20, 24, 75, 70, 20, 60, 35}
Computers and Technology
1 answer:
Nadya [2.5K]3 years ago
4 0

Answer:

list =  {10, 18, 24, 75, 70, 20, 60, 35}

Explanation:

Selection is a sorting algorithm that will set a cursor position and search for a minimum number from the list. When the minimum number is found, that minimum number will be swapped with the number in the cursor position. Only one number will be swapped and sorted in one iteration of outer loop. To sort the next number in the following outer loop iteration, the cursor will be moved to the next position and repeat the same search and swapping process as in the first iteration. When finishing all the iterations of outer loop, all numbers shall be sorted in ascending order.

You might be interested in
Which of the following contributes to your active digital footprint
VLD [36.1K]
Personal information intentionally put on a secure website
3 0
3 years ago
Read 2 more answers
Java code?????
12345 [234]

Answer:

Explanation:

Here is the code for you:

import java.io.*;

import java.util.*;

class GirlScoutCookies

{

public static void main(String[] args)

{

int [] BoxesCategory = new int[5];

Scanner sc = new Scanner(System.in);

System.out.print("Total number of girls in the troop: ");

int numOfGirlScouts = sc.nextInt();

for(int i = 0; i < numOfGirlScouts; i++)

{

System.out.print("Boxes of cookies for girl #"+(i+1)+": ");

int boxes = sc.nextInt();

if(boxes >= 0 && boxes <= 10)

BoxesCategory[0]++;

else if(boxes >= 11 && boxes <= 20)

BoxesCategory[1]++;

else if(boxes >= 21 && boxes <= 30)

BoxesCategory[2]++;

else if(boxes >= 31 && boxes <= 40)

BoxesCategory[3]++;

else if(boxes > 40)

BoxesCategory[4]++;

}

System.out.println("TOTAL BOXES\tNUMBER OF GIRL SCOUTS");

System.out.println(" 0 to 10\t"+BoxesCategory[0]);

System.out.println("11 to 20\t"+BoxesCategory[1]);

System.out.println("21 to 30\t"+BoxesCategory[2]);

System.out.println("31 to 40\t"+BoxesCategory[3]);

System.out.println("41 or more\t"+BoxesCategory[4]);

}

}

And the sample output is:

5 0
3 years ago
What are some preferences you can set in photoshop?
pishuonlain [190]

Answer: face brightness

Explanation:

hope this is the right answer :)

5 0
2 years ago
Identify the careers that require a college degree
Vikentia [17]
Doctor or teacher or an engineer

8 0
2 years ago
Rick needs to find the lowest number in a set of numbers that includes decimals. Which statistical function in a spreadsheet wil
professor190 [17]
Umm

I’m in 10th grade so.....what is a spreadsheet and statistical function
4 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following are true statements about collisions in hashing? Linear probing can cause secondary collisions. Higher sp
    6·1 answer
  • The score of a student in two subjects are inserted in the B2 and C2 cells and the passing score for each subject is 60. Which o
    13·1 answer
  • Name types of operating system with example
    5·1 answer
  • i got a set of headphones and when i plug them into my speakers the right side only works how do i fix the left side of them
    12·1 answer
  • After modifying the font of the Subheading1 style, you notice that the font of Subheading2 has also changed. What is the most li
    12·2 answers
  • discuss the benefits of normalization, and do you think we should normalize our designs to higher levels than 3NF? Why or why no
    9·1 answer
  • Businesses and sometimes individuals use a _____ to assimilate all of their social media content on a specific topic to engage r
    13·1 answer
  • Create a file named homework_instructions.txt using VI editor and type in it all the submission instructions from page1 of this
    7·1 answer
  • What will be the range of the random numbers generated by the following code snippet? rand() % 50 + 5;
    14·1 answer
  • In order to preview an attachment in an e-mail, click the attachment in the ______
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!