4
2
Your job is to make a sorting algorithm. The catch, you must copy it from Stack Overflow.
Your program will take an input array (or equivalency), and output a sorted permutation of the array.
Your program must consist solely of copy and pasted code blocks from Stack Overflow.
You may not take parts of a code block, nor may you rearrange one. A code block is everything within a single gray box.
The original question of the post may not have a tag, title, or question body containing the word "sort" in it.
You must cite the both the post and poster(s).
You may not use built in sorts.
The post must be older than this question.
Also, here are allowed modifications:
- You may move import statements to the top
- For any type of identifier type thing, you may replace all of its occurrences within the code block with a different name. Please list substitutions.
This is a popularity contest, so the correct answer with the most up-votes wins!
Are inline code segments allowed? – AJMansfield – 2014-05-11T01:51:57.593
Can I refer to my own post? – CousinCocaine – 2014-05-11T08:20:36.623
3'The original question of the post may not have a tag, title, or question body containing the word "sort" in it.' How about relaxing this rule such that posts containing stuff like "...this sort of..." can be used? i.e. only disallow sources where "sort" means "sorting". (Not sure you'll get a lot of false positives anyway, but it might be annoying in a case or two.) – Martin Ender – 2014-05-11T09:10:27.083
@AJMansfield Yes – PyRulez – 2014-05-11T12:05:25.627
If there are posts like
– user12205 – 2014-05-11T12:31:15.657def foo(bar): # your code here
is it acceptable to copy contents of another post to replace# your code here
? Or to be more exact, can I replaceParallel
here with another function I found on another post?1Does it need to work every time (randomness?), can it output more stuff than just the sorted array (all permutations), and can the answer contain the word
sort
? (Currently I only see restrictions on the question) – Dennis Jaheruddin – 2014-05-12T09:54:59.053I think I like these newfangled duct tape questions! – Jwosty – 2014-05-13T12:42:18.860
Your question might be more clear and garner more attention/answers if you bring over the more explicit rule-set from the other questions. When reading over your own, it's a little difficult to tell what's allowed, disallowed, or whatever without careful reading. According to UX, you always have to lessen cognitive load for your user base. :) – asteri – 2014-05-13T13:24:41.667
Please, we don't need a sequel to code-trolling. – None – 2014-05-14T02:48:00.603