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
Viktor [21]
3 years ago
5

Consider the following correct implementation of the selection sort algorithm.

Computers and Technology
1 answer:
rewona [7]3 years ago
4 0

Answer:

c. 3

Explanation:

The line of code on line 19

elements[minIndex] = temp;

will run a total of 3 times in with this call to the selectionSort method. The first time it will turn the 10 in position 2 into a 30. The second time it will turn the 20 in position 4 into a 40. Finally, it will turn the newly positioned 40 in position 4 into a 50. Therefore, completely sorting the array's elements.

You might be interested in
ProcessName2
RoseWind [281]

Explanation:

This is easily solvable with a for loop. Something like:

(I assume c++)

#include <iostream>

#include <string>

int main() {

take_input: //tag

std::string input;

cin >> input; //take the input

int spaceCount = 0;

char checking;

for(unsigned int i = 0; i == input.length(); ++i) {

checking = spaceCount[i];

if(checking == ' ')

spaceCount++;

}

if(spaceCount >= 1 && input.length >= 5)

std::cout << "Your name is " + input;

else

goto take_input; // reasks for input if the conditions are not met

return 0;

};

**remove all spaces before using the code, the if statements are messed up

5 0
3 years ago
How to prevent water pollution​
loris [4]

Answer:

Here is your answer

Explanation:

1. pick up litter and throw it away in a garbage can.

2. use environmentally household products such as washing powder, household cleaning agents

3. wash your car or outdoor equipment where it can flow to a gravel or grassed area instead of a street.

4. don't throw waste at ocean it will harm the animals and create tocsin.

6 0
3 years ago
Search the link <br><br> gKuJXd3zYDc<br><br> Subscribe I have a vid premiering soon
lawyer [7]
I will hope this helps :p
5 0
3 years ago
Tablets, smartphones, and video game consoles usually have which of the following types of operating systems? distributed multiu
vovikov84 [41]
Embedded.
<span>
Real-time is for thing like your thermostat (Nest) etc.
Distributed is for huge number crunching supercomputers.
Multi-user would mean more than one person was using the device at the same time with a different device.</span>
6 0
4 years ago
Read 2 more answers
What is Recursion in Java?
wel

Answer:

Recursion is a process of defining a method that calls itself repeatedly

Explanation:

Recursion is a basic programming technique of defining a method that calls itself repeatedly.

One practical example is using recursion to find the factorial of a number.

Consider the following java code below, it uses recursion to solve for the factorial of a number.

class Main {

   public static void main (String[] args) {

       System.out.println("Factorial of 3 is " + factorial(3));

       System.out.println("Factorial of 5 is " + factorial(5));

       System.out.println("Factorial of 7 is " + factorial(7));

   }

   //the factorial method uses recursion to find the factorial of the

   // parameter of the integer pass into it

   

   private static int factorial(int n) {

       int result;

       if ( n ==1) return 1;

       result = factorial(n-1) * n;

       return result;

   }

}

6 0
3 years ago
Other questions:
  • Colin Mackay Inc., a software company with its head office in Amsterdam, has employees across three continents. The company's pr
    10·1 answer
  • Do the shape of a sign gives you a clue about the information contained on the sign
    7·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    11·2 answers
  • What is the simplest way to permanantly get rid of an unwanted file
    14·1 answer
  • Write a machine-language program to add the three numbers 2, –3, and 6 and output the sum on the output device. Write it in a fo
    11·1 answer
  • Which media device uses the characteristic continuous?
    10·1 answer
  • 1)When the liquid is spun rapidly, the denser particles are forced to the bottom and the lighter particles stay at the top. This
    10·1 answer
  • What might a designer need to consider when choosing an appropriate energy source for products and power systems
    15·1 answer
  • 2. Why is there no country code for the USA?
    7·2 answers
  • In Full Screen Reading View, which area is reduced?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!