Given an array of integers?nums
, sort the array in ascending order.
Example 1:
Input:?[5,2,3,1]
Output: [1,2,3,5]
Example 2:
Input: [5,1,1,2,0,0]
Output: [0,0,1,1,2,5]
Note:
1 <= A.length <= 10000
-50000 <= A[i] <= 50000
Github 同步地址:
https://github.com/grandyang/leetcode/issues/912
参考资料:
https://leetcode.com/problems/sort-an-array/
LeetCode All in One 题目讲解汇总(持续更新中...)
原文地址:https://www.cnblogs.com/grandyang/p/11483981.html
时间: 2024-10-13 04:10:16