Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Astrachan strikes again.

Name: Anonymous 2015-02-13 14:04

Due to its simplicity, bubble sort is often used to introduce the concept of an algorithm, or a sorting algorithm, to introductory computer science students. However, some researchers such as Owen Astrachan have gone to great lengths to disparage bubble sort and its continued popularity in computer science education, recommending that it no longer even be taught.

Name: Anonymous 2015-02-13 14:13

But bubble sort is the right thing to do in small cases.

Name: Anonymous 2015-02-13 15:50

>>2
The crap you implement with GOTO doesn't count as bubble sort.

Name: Anonymous 2015-02-13 19:20

What a cocksucker. Even Dickstra wasn't that arrogant. Apparently students are so fucking stupid that they can't be taught the difference between good ideas, bad ideas, and ideas that are only useful sometimes. Instead, since he is so smart that he can objectively come to the truth, he has decided to censor it and hope it goes away. What a pathetically paternalistic and social constructivist bullshit outlook. He should keep his fucking mouth shut.

Name: Anonymous 2015-02-13 21:15

>>4
Shut up, pleb.

Name: back to /g/ 2015-02-13 21:29

>>5
back to /g/

Name: Anonymous 2015-02-13 23:37

bubble sort my anus

Name: Anonymous 2015-02-14 4:07

>>1
recommending that it no longer even be taught.
His next move should be banning factorial, because it is too simple.

Name: Anonymous 2015-02-14 4:38

When n is less than 1 it's beneficial to increase time complexity as much as possible.
I suggest defining input as half an array of length m; therefore n = 1/2 as input is only 1/2 of an array.
Increasing time complexity is easy, just add nested loops, or if you're feeling fancy functions with loops that recursively call themselves.

Here, a more efficient hello world:
#include<stdio.h>
#include<stdlib.h>

void f(void*, int, int);

main(int argc, char *argv[]){
//Get half of argv
char **argv2 = malloc(sizeof(char *) * argc / 2);
int i;
for(i = 0; i <= argc / 2; ++i){
argv2[i] = argv[i];
}

//Call our efficiency function
f(argv, argc/2, 0);

printf("Hello, world!");
}

void f(void *array, int length, int depth){
if(depth == 10*length){
return;
}

int i;
for(i = 0; i < length; ++i){
f(array, length, depth + 1);
}
return;
}

Name: Anonymous 2015-02-14 16:59

>>9
Epic Javascript everyone-can-code school quality code!

Name: Anonymous 2015-02-14 17:12

I wish not to be associated with anybody who does not smoke mary jane!

Name: Anonymous 2015-02-14 17:38

>>11
Smoking is bad for your lungs.

Name: Anonymous 2015-02-14 17:49

>>9
sizeof(char *)
that is always equal to one you dumb nigger

Name: Anonymous 2015-02-14 17:50

>>13
Actually, it equals the size of a pointer.

Name: Anonymous 2015-02-14 18:03

>>13
>>14
PWNT.

Name: Anonymous 2015-02-14 18:39

>>15
NTMA.

Name: Anonymous 2015-02-14 19:47

>>15
OYQ下

Name: Anonymous 2015-02-14 22:44

Bubble sort is asymptotically equivalent in running time to insertion sort in the worst case, but the two algorithms differ greatly in the number of swaps necessary. Experimental results such as those of Astrachan have also shown that insertion sort performs considerably better even on random lists. For these reasons many modern algorithm textbooks avoid using the bubble sort algorithm in favor of insertion sort.

Name: Anonymous 2015-02-14 23:31

Could a golden retriever maul Lennart Poettering to death without contracting AIDS?

Name: Anonymous 2015-02-14 23:40

>>14
This is false, it equals the size of a char pointer. Other pointers may have different sizes.

Name: Anonymous 2015-02-14 23:45

>>19
I don't think human AIDS can infect dogs, so probably.
Why? Are you a golden retriever?

Name: Anonymous 2015-02-15 0:19

>>21
AIDS isn't human you silly billy.

Name: Anonymous 2015-02-15 1:42

Speaking of AIDS, did you hear that the gays are going to be dying a lot faster now? There's a new AIDS in town, and it's began to spread to the USA mainland.

http://www.sciencedaily.com/releases/2015/02/150212122217.htm

Name: Anonymous 2015-02-15 2:20

Name: Anonymous 2015-02-15 2:37

>>24
Wow, not only does Terry post but he posts a lot.

Name: Anonymous 2015-02-15 8:17

>>25
It's actually God posting from TempleOS.

Name: Anonymous 2015-02-15 12:40

>>20
Never read your Kernighan & Ritchie, huh?

Name: Cudder !MhMRSATORI 2015-02-15 14:55

>>9
malloc
The first rule of malloc() is that you don't use malloc().
The second rule of malloc() is that you don't use malloc().

Name: Anonymous 2015-02-15 15:16

>>28
Expert programmer™

Name: Anonymous 2015-02-15 20:14

>>28
STACKWARESUPREMACY

Name: Anonymous 2015-02-15 22:07

>>28
Sepples weenie detected.

Name: Anonymous 2015-02-15 22:17

Cudder is all talk and no action.

Name: Anonymous 2015-02-15 22:18

Cudder is all talk and one fizzbuzz.

Name: Cudder !MhMRSATORI 2015-02-15 22:55

#include <stdlib.h>

void main() {
printf("Insert 10 number\n");
int i;
int* n;
i=1;
while(i<=10) {
printf("Enter number now: ");
n = (int*)malloc(sizeof(int));
scanf("%d", n);
printf("You entered: %d\n", *n);
}
free(n);
return 0;
}

Name: Cudder !MhMRSATORI 2015-02-15 22:57

>>34
Possibly the best code ever written.
And don't worry, the memory leak is intentional, for efficiency purposes (free is slow).

Name: Anonymous 2015-02-19 17:29

>>34-35
Hope this is satire

Name: Anonymous 2015-02-19 17:35

>>36
Hope you wear attire.

Name: Anonymous 2015-02-19 17:37

>>37
Only if the weather is dire.

Name: Anonymous 2015-02-19 17:47

>>38
You're an exhibitionist, sire.

Name: Anonymous 2015-02-19 18:16

>>34,35
That's a pretty good impression, but as we all know Cudder doesn't write programs.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List