Blink
Addicted Member
Posts: 1,699
|
Post by Blink on Nov 26, 2007 8:27:23 GMT -5
Winner gets a cookie. void guessMe(int numbers[], int array_size) { int i, j, index;
for (i=1; i < array_size; i++) { index = numbers[i]; j = i; while ((j > 0) && (numbers[j-1] > index)) { numbers[j] = numbers[j-1]; j = j - 1; } numbers[j] = index; } }
|
|
|
Post by Schubaltz on Nov 26, 2007 14:10:02 GMT -5
We were supposed to fix the &nb sp; for the code tags. I even left a big comment in the source that said that. Oh, and can I answer?
|
|
Blink
Addicted Member
Posts: 1,699
|
Post by Blink on Nov 26, 2007 14:26:11 GMT -5
We were supposed to fix the &nb sp; for the code tags. I even left a big comment in the source that said that. Oh, and can I answer? Yeah, those are ugly. And do you know the answer? Then do tell. I don't mind my thread having a short life.
|
|
|
Post by Alca-diddly-doo on Nov 26, 2007 21:21:57 GMT -5
umm....
Does it do something to the NavBar?
|
|
Blink
Addicted Member
Posts: 1,699
|
Post by Blink on Nov 26, 2007 22:01:33 GMT -5
umm.... Does it do something to the NavBar? Way off, sorry.
|
|
Chad
Senior Member
Former Staff
Posts: 396
|
Post by Chad on Nov 26, 2007 22:07:28 GMT -5
creates an infinite loop of numbers? xD
|
|
Blink
Addicted Member
Posts: 1,699
|
Post by Blink on Nov 26, 2007 22:15:22 GMT -5
creates an infinite loop of numbers? xD If Brenden was 100% wrong you were 99%. So getting warmer. Good job guys.
|
|
Chad
Senior Member
Former Staff
Posts: 396
|
Post by Chad on Nov 26, 2007 22:56:28 GMT -5
lol omg I am good. Does it do absolutely nothing?
|
|
Blink
Addicted Member
Posts: 1,699
|
Post by Blink on Nov 26, 2007 23:01:07 GMT -5
Ok, here's a very big hint.
It's a sort.
|
|
Chad
Senior Member
Former Staff
Posts: 396
|
Post by Chad on Nov 26, 2007 23:28:09 GMT -5
sorts em by their value?
|
|
Blink
Addicted Member
Posts: 1,699
|
Post by Blink on Nov 26, 2007 23:30:58 GMT -5
Hurray, but that's only part of it. What is the name of this sort?
|
|
Chad
Senior Member
Former Staff
Posts: 396
|
Post by Chad on Nov 27, 2007 21:07:48 GMT -5
integer array? xD
|
|