반응형
https://leetcode.com/problems/sort-an-array/
class Solution {
public:
vector<int> sortArray(vector<int>& nums) {
sort(nums.begin(), nums.end());
return nums;
}
};
;;;;
반응형
'IT > 알고리즘' 카테고리의 다른 글
42] Leetcode 1528. Shuffle String (0) | 2020.08.18 |
---|---|
41] Leetcode 1. Two Sum (0) | 2020.08.18 |
39★] Leetcode 905. Sort Array By Parity (0) | 2020.08.06 |
38] Leetcode 961. N-Repeated Element in Size 2N Array (0) | 2020.08.05 |
37] Leetcode 1380. Lucky Numbers in a Matrix (0) | 2020.07.21 |
댓글