Trolling homework questions - sorting
codegolf.stackexchange.com
Trolling homework questions - sorting
1–10 of 51 posts
Re: Trolling homework questions - sorting
#2This is brilliant because it encourages thinking a little differently to come up with the wrong answer (which helps you learn to identify wrong code). Nice work OP
Re: Trolling homework questions - sorting
#31. Generate all permutations of the input.
2. Return the permutation that is in order.
3. Profit!
Re: Trolling homework questions - sorting
#4This is brilliant because it encourages thinking a little differently to come up with the wrong answer (which helps you learn to identify wrong code). Nice work OP
Well, a lot of them aren't wrong answers, just really inefficient or overly-complicated implementations.
Re: Trolling homework questions - sorting
#51. Generate all permutations of the input. 2. Return the permutation that is in order. 3. Profit!
1. Output all permutations of the input
2. There is no step 2.
You've technically outputted the input list in order...somewhereRe: Trolling homework questions - sorting
#6The ultimate answer is to ask your young siblings to sort them for you. The price is a little time and some candy. Or since so many people are unemployed, ask them to crowdsource and work for something in return!
Or just ask wolframalpha.
Re: Trolling homework questions - sorting
#7"trollsort.c:43:3: warning: incompatible implicit declaration of built-in function ‘printf’"
Epic. Epic I say.
Re: Trolling homework questions - sorting
#8Re: Trolling homework questions - sorting
#9Wow. http://codegolf.stackexchange.com/a/16274
Not as impressive as this http://www.jsfuck.com/
Re: Trolling homework questions - sorting
#10No one suggested sleep sort? That's the ultimate trolling-but-almost-legitimate sorting algorithm. :)