subject

Write a python program to sort a list of numbers(get the list as input) using selection sort and bubble sort. Selection sort (5 points)

Pseudo Code: (Each line of pseudo-code converts to one line of code)

Loop from the first element of the list to (n-1 )th element(i)

Store the minimum index as i

Loop from the second element to nth element (j)

Compare the min index element and the current loop element(j)

If the current element is less than the min index

Store this index as the min index

#At the end of this inner loop’s first run the min index will be holding the index value of the smallest item in the list

Swap the ith element with the min index element

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 13:30
Write lines of verse that rhyme to remember the following information: acid rain is a type of air pollution caused by chemicals in the air.
Answers: 1
question
Computers and Technology, 23.06.2019 11:30
Which excel file extension stores automated steps for repetitive tasks?
Answers: 1
question
Computers and Technology, 24.06.2019 17:00
Aman travel 200m towards east< br /> from his house then takes left< br /> to turn and moves 200 m north< br /> find the displacement & distance.< br />
Answers: 3
question
Computers and Technology, 24.06.2019 19:20
Which command suppresses the visibility of a particular row or column in a worksheet?
Answers: 1
You know the right answer?
Write a python program to sort a list of numbers(get the list as input) using selection sort and bub...
Questions
question
Mathematics, 22.07.2021 14:00
question
Mathematics, 22.07.2021 14:00
question
English, 22.07.2021 14:00
question
Mathematics, 22.07.2021 14:00
question
Mathematics, 22.07.2021 14:00
question
Mathematics, 22.07.2021 14:00
question
Mathematics, 22.07.2021 14:00