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
Schach [20]
3 years ago
10

Which of the following sorting algorithms is described by this text? "Take the item at index 1 and see if it is in order compare

d to the item at index 0. If it is not, then swap the two items. Next, take the item at index 2 and compare it to the items at the lower indexes. Move items in the lower indexes to a higher one until you find the proper location to place the value so that it is in the correct order. Continue this process with all remaining indexes."
a. insertion sort
b. selection sort
c. merge sort
d. quick sort
e. binary sort
An array of integers is to be sorted from smallest to biggest using a selection sort. Assume the array originally contains the following elements:
11 17 30 8 20 25
What will it look like after the third pass through the for loop?
a. 8 11 17 20 25 30
b. 8 11 17 30 20 25
c. 8 17 30 11 20 25
d. 8 11 17 20 30 25
e. 8 11 30 17 20 25
Computers and Technology
1 answer:
trasher [3.6K]3 years ago
7 0

Answer:

b. selection sort

b. 8 11 17 30 20 25

Explanation:

The options above are the correct answers to the given questions.

Selection sort is a simple comparison-based sorting algorithm.

selection sort. (algorithm) Definition: A sort algorithm that repeatedly searches remaining items to find the least one and moves it to its final location. The run time is Θ(n²), where n is the number of elements. The number of swaps is O(n).

It is this sorting algorithm that will best ne suitable in the given event.

You might be interested in
Suppose that in a 00-11 knapsack problem, the order of the items when sorted by increasing weight is the same as their order whe
frosja888 [35]

Answer:

Following are the response to the given question:

Explanation:

The glamorous objective is to examine the items (as being the most valuable and "cheapest" items are chosen) while no item is selectable - in other words, the loading can be reached.

Assume that such a strategy also isn't optimum, this is that there is the set of items not including one of the selfish strategy items (say, i-th item), but instead a heavy, less valuable item j, with j > i and is optimal.

As W_i < w_j, the i-th item may be substituted by the j-th item, as well as the overall load is still sustainable. Moreover, because v_i>v_j and this strategy is better, our total profit has dropped. Contradiction.

8 0
3 years ago
In five to ten sentences, explain what netiquette is and how it improves efficiency and productivity in the workplace.
dlinn [17]

Netiquette is a form of communication done correctly online. Good netiquette involves respecting others privacy, using correct grammar, and not doing anything online that will annoy or disrupt others. It is important to have netiquette while online, because communication online is non verbal and you can’t tell how someone is reacting. Having netiquette is important. It implies that you have polite behaviors, and want to build up relationships with people in your work space or at a party you plan on attending. Netiquette is one way to show respect to a person, and to show that you deserve respect. It improves how you organize your writing, and shows how productive you can be. By helping you to become polite online and respectful to other users of the internet, Netiquette is especially important for future letters, emails, or other writing forms.


4 0
3 years ago
Read 2 more answers
True or Flase<br><br> In C++, the body of a for loop may never run even once.
stiks02 [169]

Answer: True

Explanation: For loop is used in the C++ programming is defined as the statement that defines about the flow control .This loop works under some condition that is considered.

For loop is evaluated to execute for one time if the statement condition is true but there are also chances of no execution at all because of the incorrect condition. So, for loop might not run even once in that condition.Thus , the statement given is true.

3 0
3 years ago
Meg wants to preview all images in a folder so that she can quickly find the image she wants. Which view will help her do this?
Liono4ka [1.6K]
Thumbnails is the answer

3 0
3 years ago
What is the nearest inhabited area to the amazon rainforest
TEA [102]
There are inhabited areas INSIDE the Amazon Rainforest. Many primitive tribes with little to no contact of the outside world live in remote areas of the rainforest, but the closest major city to the rainforest (also inside) is Manaus, Brazil.
4 0
3 years ago
Other questions:
  • The open items on your computer are displayed here. menu bar open bar taskbar toolbar
    15·2 answers
  • Write the sql command to show which tutor needs to be reminded to turn in reports.
    13·1 answer
  • When using the following symbol, there are two arrows coming out of it. One arrow corresponds to what happens in the program if
    7·1 answer
  • What is the square root of 1600 and 36 ?​
    6·1 answer
  • Which option can be used to access more settings than are available in the Backstage view?
    5·1 answer
  • g Design a Boolean function called isPrime, that accepts an integer as an argument and returns True if the argument is a prime n
    14·1 answer
  • Which relation is created with the primary key associated with the relationship or associative entity, plus any non-key attribut
    6·1 answer
  • What icons in the toolbar change the look of the presentation text? It’s either Drawing, Formatting,Presentation, or Standard
    9·2 answers
  • This unit is used to print the picture on a paper
    6·1 answer
  • What is output?<br> x = 2<br> y = 3<br> print (x * y + 2)<br> 4<br> 2<br> 8<br> 10
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!