apple pie's submission of Reversal Sorting | CodeChef