Editorial for Wesley's Anger Contest 4 Problem 1 - Zeyu's Zany Zort
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
Author:
The most common mistake for this problem was not following the Output Specification as many people faced Presentation Errors
.
Some solutions included qsort
, bubble sort, insertion sort, built-in sort and sorting then reversing the array.
Notable solutions include:
- Creating a temporary list of , sorting it then reassigning values back to the original array .
- Creating a temporary list of , sorting it then removing from , then reinserting the temporary array back into .
Time Complexity: if bubble sort is used
Comments