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
goldenfox [79]
3 years ago
10

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

m 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:
DochEvi [55]3 years ago
5 0

Answer:

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

Explanation:

In selection sort 1st element of array is compared with all elements in list. If there is any element smaller than any other element in the list,  that will be swap with first element as

1st iteration:

in given list first element is 24, this will compare with whole list and find the number that is smaller than any other element in list. there 10 is smallest element in the list so in first iteration the list is given as:

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

2nd Iteration:

After first iteration the smallest element of list will comes at first position. Now we start with 2nd position of list. 2nd element of the list will be compared with all other elements except 1st element. The 2nd smallest element of the list will be replaced with 2nd element of array.

In 2nd iteration, 18 is 2nd smallest element in the list so that will be swap with 2nd element of list. now the list is given as after

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

You might be interested in
How do you turn on the Track Changes feature in a word-processing document?
aniked [119]
Click options in the tools menu and select track changers
5 0
3 years ago
Write a program to input a number.Find the sum of digits and number of digits
ki77a [65]

omg a computer program

i love it

okay so i will assume taht you want the program to be in python

here we go

a = int(input("Enter a number ")

b = int(input("Enter another number ")

sum = a + b

def Digits(sum):

count = 0

while sum != 0:

sum //= 0

count += 1

return count

print(f"Sum is {sum} \nnumber of digits are {Digits(sum)}")

7 0
3 years ago
Read 2 more answers
System development life cycle
Taya2010 [7]
The systems development life cycle (SDLC) is a conceptual model used in project management that describes the stages involved in an information system development project, from an initial feasibility study through maintenance of the completed application. SDLC can apply to technical and non-technical systems.
6 0
2 years ago
WILL DO A BRIANLY! Use an algorithm to help the Python Turtle get to the finish line in 10 steps by using only the 3 commands be
Alexandra [31]

Answer:

3 3 2 1 1

Explanation:

8 0
3 years ago
Programmers use _____ languages in the Rapid Application Development (RAD) methodology to facilitate code reuse?
photoshop1234 [79]
The Go programming language
8 0
3 years ago
Other questions:
  • Write the interface (.h file) of a class ContestResult containing: An data member winner of type string, initialized to the empt
    14·1 answer
  • Which translator program reads small portions of a program at a time, translating them into machine instructions which are then
    12·1 answer
  • Say our confusion matrix is as follows, calculate precision, recall, and accuracy. Interpret the results for the positive class.
    10·1 answer
  • How many computers/laptop's suported windows 10 pro with a game in vr?
    9·2 answers
  • Why would a programmer use a flow chart? (Edge2020 Coding Critical Thinking Questions)
    9·1 answer
  • Importance of computer​
    15·1 answer
  • How has technology impacted our lives and the world we live in? In your own words.
    9·1 answer
  • Nia is editing a row in an Access table. The row contains the Pencil icon on the left end of the record
    12·2 answers
  • Five technology tools and their uses​
    5·1 answer
  • Can i eat chicken and you shut
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!