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
Ivenika [448]
3 years ago
14

Show the steps of a Selection Sort for the numbers ( 5 3 9 5 ).

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

Answer:

Sorted array will be:-

3 5 5 9

Explanation:

In Selection Sort algorithm it sorts the array by repeatedly finds the minimum in the array form the array that is unsorted and swaps it with the value at the first position.

The unsorted array:- 5 3 9 5

In first iteration

minimum is 3.

3 will be swapped with 5.

Now the array is 3 5 9 5

sorted array 3

In second iteration

unsorted array is 5 9 5

sorted array 3 5

and the minimum from it is 5

No swapping will occur.

In third iteration

unsorted array is 9 5

minimum is 5

sorted array 3 5 5

swap it with 9.

Now the array is sorted.

3 5 5 9

You might be interested in
Define inheritance. give an example
Nezavi [6.7K]
A class can be defined<span> using another class as a foundation. In object-oriented programming terminology, one class can </span>inherit<span> fi elds and methods from another. An object that inherits from another is called a subclass, and the object it inherits from is called a superclass. A subclass extends the superclass.</span>
3 0
3 years ago
What does in-private or incognito browsing do?
Aleks04 [339]

All it does it let you browse the internet, but whatever you look up, it isn't put on your browser history.
5 0
2 years ago
This program will convert a set of temperatures from Fahrenheit to Celsius and Kelvin. Your program will be reading in three dou
Naily [24]

Answer:

see explaination

Explanation:

#include<iostream>

#include<iomanip>

using namespace std;

int main()

{

double temp1,temp2,inc,cel;

int i=1;

while(i==1)

{

i=0;

cin>>temp1>>temp2>>inc;

if(temp2<temp1||inc<=0)

{

i=1;

cout<<"Starting temperature must be <= ending temperature and increment must be >0.0\n";

}

}

cout<<endl;

cout<<setw(15)<<"Fahrenheit"<<setw(15)<<"Celsius";

while(temp1<=temp2)

{

cel=(temp1-32)/1.8;

cout<<endl;

cout<<fixed<<setprecision(3)<<setw(15)<<temp1<<setw(15)<<cel;

temp1+=inc;

}

}

Please kindly check attachment for output.

8 0
3 years ago
How to connect tablet to your bluetooth at home?
anygoal [31]
Make sure both devices are enabled or are able to connect via Bluetooth. Set the tablet to "discover" mode. Or, you can have it scan for nearby Bluetooth devices. Select the device. Sometimes, you are prompted for a password or code. If you don't have the manual (which usually states it) you can use either 0000 or 1234. 
5 0
3 years ago
Who needs to be involved when assembling business solutions that include hardware and software?
sveta [45]
Software engineer i would say
5 0
2 years ago
Read 2 more answers
Other questions:
  • Which elements in a web page require a visitor’s action?
    15·1 answer
  • Access controls are enforced automatically in FMS service routines that access and manipulate files and directories.
    9·1 answer
  • Mara's presentation included essential information about the company's new safety procedures. She wanted to make
    13·2 answers
  • What is a binary message
    12·2 answers
  • Quiénes se benefician de la realidad virtual​
    12·1 answer
  • What is it called when servers on the Internet supply applications as a service, rather than a product
    14·1 answer
  • What is the best food to eat before workout? why?​
    10·2 answers
  • Which requires large computer memory?
    15·1 answer
  • How do you save a document in a format so that any reader can view it?
    5·1 answer
  • A for construct is a loop construct that processes a specified list of objects. As a result, it is executed as long as there are
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!