Click here to Skip to main content
15,887,464 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
This is my code: Ideone.com - VXYhO6 - Online Java Compiler & Debugging Tool[^]

I need it to do this to any type of data but this is the best example:

User types:
apple
Apple
Zone
apple
done
You display:
As entered
0:a:apple
1:a:Apple
2:z:Zone
3:a:apple
Bubble Sorted
0:a:apple
1:a:Apple
3:a:apple
2:z:Zone
Selection Sorted
1:a:Apple
0:a:apple
3:a:apple
2:z:Zone

What I have tried:

My Bubble sorted and selection sorted aren't working as I wish they would be.
Posted
Comments
Patrice T 4-Dec-16 15:32pm    
"My Bubble sorted and selection sorted aren't working as I wish they would be. "
is not informative.
Try to copy your code and explain what is wrong, showing wrong output can also help.
Member 12886325 4-Dec-16 16:12pm    
My Bubble Sort and Selection Sort are coming up with the same outcomes.
Bubble Sort
0:a:apple
1:a:Apple
2:a:apple
3:z:Zone
Selection Sort
0:a:apple
1:a:Apple
2:a:apple
3:z:Zone
Member 12886325 4-Dec-16 16:12pm    
When I am wanting this to happen:
Bubble Sorted
0:a:apple
1:a:Apple
3:a:apple
2:z:Zone
Selection Sorted
1:a:Apple
0:a:apple
3:a:apple
2:z:Zone
Patrice T 4-Dec-16 16:21pm    
Use Improve question to update your question.
So that everyone can pay attention to this information.
Richard MacCutchan 5-Dec-16 3:52am    
Please do what ppolymorphe suggests and show the code that is not working, and exactly what the error(s) are. Do not expect people to go to other sites to collect information.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900