Question Sorting Algortim

bayu27

New member
Joined
May 14, 2015
Messages
3
Programming Experience
1-3
Hello world,
I'm in trouble..
I made a sorting algoritm, ex. buble sort . .
but i can't see the process of for (loop). .
it just sorted,
I mean, when Input 54231,
output must be step by step . .
like :
for 1 = 42315 (loop 1)
for 2 = 23145 (loop 2)
for 3 = 21345 (loop 3)
for 4 = 12345 (loop 4)
how to make it?
thxs.
 
So, you're saying that you need to write code to implement the Bubble Sort algorithm and you need to out the state of the list after each bubble has finished rising, correct? What is the issue exactly, i.e. are you having trouble implementing the algorithm or displaying the output?
 
I want to show each of its sorting process,
I want to displaying the output step by step, I want to see the process.
 
Right, so where's the actual issue? Are you saying that you've implemented the algorithm? If so then let's see your implementation so that we can indicate where the output should be done. If you haven't then why not, i.e. what are you stuck on? If you just don't know how to implement the sorting algorithm then I suggest that you do a bit of research on that, make you're attempt and then post if and when you have a specific issue.
 
Back
Top