This question already has an answer here:
- The Golf (re)Sort [closed] 4 answers
All good coders know some good sorting algorithms like quicksort or merge sort. There is also slow sorting algorithms, e.g. bubble sort and insertion sort.
But those are such easy to implement and so, so efficient. Too efficient. Your task is to create very slow sorting algorithm.
Please attach the Big O notation of your algorithm to your post to help us rate them. Also, please describe how your sorting algorithm works.
Input given trough STDIN. The first line contains number of arguments, and arguments are given after that. The arguments are integers in range from 0 to 105 and there are maximum 103 of them.
Output is list sorted and printed line by line into STDOUT sorted beginning from decending order.
You may not use any random numbers or any other random sources.
This is popularity-contest.