Question: Write a program in python to take a list of numbers A and put them into a sorted list B, using a selection sort, which

Write a program in python to take a list of numbers A and put them into a sorted list B, using a selection sort, which finds the smallest number in A and puts it into the first element of the list B. Then find the second smallest element of the list and put it into the second element of B, etc.

Show how the program works for a list:

A = [5, 6,1, 2, 8, 9, 12, 18, 7, 10]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!