You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to BYU 142 Summer 2011
I can get my bubble sort to spit out 20 "random" numbers in ascending
order... but there are repeats of several numbers and sometimes when I
run it I get all of the same number. For instance one output was:
59
68
68
68
68
68
69
69
69
97
97
97
97
97
97
97
97
97
97
97
Is that okay? Or could I do better?
Sarah Morley
unread,
Jul 29, 2011, 4:45:44 PM7/29/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to byu-142-s...@googlegroups.com
I'd guess that you are swapping values incorrectly. The chances of getting that many duplicates that often is pretty slim. Try making your own int array with hard coded values to see if that's being sorted correctly.