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
Consider a pipelined processor with just one level of cache. assume that in the absence of memory delays, the baseline cpi of th
babunello [35]

Alternative 1:A small D-cache with a hit rate of 94% and a hit access time of 1 cycle (assume that no additional cycles on top of the baseline CPI are added to the execution on a cache hit in this case).Alternative 2: A larger D-cache with a hit rate of 98% and the hit access time of 2 cycles (assume that every memory instruction that hits into the cache adds one additional cycle on top of the baseline CPI). a)[10%] Estimate the CPI metric for both of these designs and determine which of these two designsprovides better performance. Explain your answers!CPI = # Cycles / # InsnLet X = # InsnCPI = # Cycles / XAlternative 1:# Cycles = 0.50*X*2 + 0.50*X(0.94*2 + 0.06*150)CPI= 0.50*X*2 + 0.50*X(0.94*2 + 0.06*150) / X1= X(0.50*2 + 0.50(0.94*2 + 0.06*150) ) / X= 0.50*2 + 0.50(0.94*2 + 0.06*150)= 6.44Alternative 2:# Cycles = 0.50*X*2 + 0.50*X(0.98*(2+1) + 0.02*150)CPI= 0.50*X*2 + 0.50*X(0.98*(2+1) + 0.02*150) / X2= X(0.50*2 + 0.50(0.98*(2+1) + 0.02*150)) / X= 0.50*2 + 0.50(0.98*(2+1) + 0.02*150)= 3.97Alternative 2 has a lower CPI, therefore Alternative 2 provides better performance.

8 0
2 years ago
Which command executed in Windows PE would transfer both the files and directory structure from one device to another device or
EleoNora [17]

Answer:

xcopy

Explanation:

xcopy (which stands for extended copy) command, was created to have several functions and ability to copy one or more folders, files or an entire directory from one location to another. It is more powerful than copy command that was seen in the first set of operating systems. It is currently being built into desktop operating systems and Microsoft windows server.

6 0
3 years ago
Which statement about dialogues is NOT correct? Select one: A. Users should be able to control the direction of speed of dialogu
Gennadij [26K]

Answer:

Option B is not correct

Explanation:

Dialogues become problematic when they appear automatically because of high level incompatibility

3 0
2 years ago
Why is there no window on dishwsher
olchik [2.2K]

Because most people really don't want or need to see what's in there.

If you want to, open the door during the cycle. It won't harm anything.

If you're curious to see a dishwasher in action, some appliance showrooms have a display model, where the spray parts and the racks are in an entirely transparent box. They're to show how powerfully and completely the stuff inside will get cleaned, but you can also see how the dishwasher is intended to work, by filling with just a couple of inches of water, and then recirculating it for the duration of the cycle, to loosen the stuff on the dishes.

3 0
2 years ago
Read 2 more answers
to _________________________ is a mouse operation in which you move the mouse until the pointer on the desktop is positioned on
Radda [10]
Drag... you drag the mouse across the screen.
6 0
3 years ago
Other questions:
  • What file formats can you safely use in a video presentation
    14·1 answer
  • Which are malicious codes? <br><br> JavaScript <br> Key loggers <br> Scrum <br> Spyware <br> Worms
    12·1 answer
  • In CadStd, what does the Zoom All button do? A. Makes a drawing bigger so you can see small details B. Returns a drawing to a si
    5·1 answer
  • Define a JavaScript function named showGrades which does not have any parameters. Your function should create and return an arra
    5·1 answer
  • Please answer this correctly what’s the answer opening modify style dialog box enables you to
    8·1 answer
  • Kenny FRIEND ME. Ps that is my brother
    9·2 answers
  • This is your code.
    9·1 answer
  • Write a for loop that uses the loop control variable to take on the values 0 through 10.
    10·1 answer
  • I need some help-
    15·1 answer
  • What type casting mechanism should be used if you want to safely change (cast) a pointer type for pointing to a different object
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!