Given a stack represented as an array (index 0 is the bottom, the last element is the top), return the stack sorted in ascending order so that the largest element ends up on top. The input is JSON {stack}.
Input: JSON {stack}.
Output: Array — the sorted stack (bottom to top, ascending).
Input: {"stack":[3,1,4,1,5]}
Output: [1,1,3,4,5]
Explanation: Sorted ascending, largest on top.Input: {"stack":[]}
Output: []
Explanation: Empty stays empty.Input: {"stack":[2,1]}
Output: [1,2]
Explanation: Two elements ordered.0<=n<=1000