Jessie M.

asked • 02/09/21

bubble sort python

Information to solve question:


Use "a" for loop to calculate the sum of squares of values in this list: 1, 7, 8, 6, 11. (The answer should be 271)


Create a recursive function to do the same calculation a in the previous question. (The function input will be the list. Each recursion, you are going to send a sub-list with one less item from the list).


(question to answer)


(1) Create a function to perform bubble sorting (in python language) as descried in this tutorial: https://www.geeksforgeeks.org/bubble-sort/ . The algorithm should stop when there are no swaps in the last iteration





Patrick B.

source code uploaded to RESOURCES section if you want it
Report

02/09/21

1 Expert Answer

By:

Patrick B. answered • 02/09/21

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.