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!
sort
? (Currently I only see restrictions on the question) \$\endgroup\$