0

# Show an algorithm to place the set (6,2,1,9) into descending order using a flow chart and trace tables using diagrams or example

I want to see how the program works especially the flow chart plus the algorithms as well from the start to stop

12th Apr 2021, 8:06 AM
Dalitso Saviel Chilomo
+ 3
To quote my former computer science professor, the only good thing about bubble sort is it's name. It's a very slow algorithm although it's conceptually easy to understand So if you're working with a very large dataset it can run painfully slow However, with a small dataset and with the faster CPUs' these days I guess the difference isn't that noticeable Try quicksort. At least it can perform much faster unless the dataset is sorted in reverse order already
14th Apr 2021, 5:48 AM
Macross-Plus
12th Apr 2021, 9:37 AM
ChaoticDawg
0
look up "bubble sort"
12th Apr 2021, 8:27 AM
Slick
0
Algorithm is the step by step to giving task
13th Apr 2021, 1:16 PM
Hajarat Olamide
0
Use BUBBLE SORT : If (b>a){ temp=a; a=b; b=temp;}
12th May 2021, 11:46 AM
Sanjay Kamath
0
I am also getting the same issue mentioned above.
16th Nov 2022, 11:31 AM
Randy
- 1
Start and stop by flow chart
13th Apr 2021, 1:15 PM
Hajarat Olamide
- 1
#using bubble sort li=list({6,2,1,9})#we have to first type cast it to a list as set doenot has fixed index since it follows hashing. for i in range(len(li)): for j in range(len(li)): if(li[i]>li[j]): temp=li[i] li[i]=li[j] li[j]=temp print(li)
7th Dec 2021, 3:45 PM
Chandu