当前位置:网站首页>Force buckle 912 Sort array
Force buckle 912 Sort array
2022-07-07 20:06:00 【Tomorrowave】
Code section
Give you an array of integers nums, Please arrange the array in ascending order .
Example 1:
Input :nums = [5,2,3,1]
Output :[1,2,3,5]
Example 2:
Input :nums = [5,1,1,2,0,0]
Output :[0,0,1,1,2,5]
Tips :
1 <= nums.length <= 5 * 104
-5 * 104 <= nums[i] <= 5 * 104
Ideas
Ascending order list.sort()
Code section
class Solution:
def sortArray(self, nums: List[int]) -> List[int]:
nums.sort()
return nums
边栏推荐
- tp6 实现佣金排行榜
- 吞吐量Throughout
- R language dplyr package mutate_ At function and min_ The rank function calculates the sorting sequence number value and ranking value of the specified data column in the dataframe, and assigns the ra
- IP tools
- Semantic slam source code analysis
- Force buckle 88 Merge two ordered arrays
- mock.js从对象数组中任选数据返回一个数组
- 剑指 Offer II 013. 二维子矩阵的和
- [sword finger offer] sword finger offer II 012 The sum of left and right subarrays is equal
- LeetCode_7_5
猜你喜欢

CSDN syntax description

LeetCode力扣(剑指offer 36-39)36. 二叉搜索树与双向链表37. 序列化二叉树38. 字符串的排列39. 数组中出现次数超过一半的数字

vulnhub之Funfox2

Data island is the first danger encountered by enterprises in their digital transformation

Welcome to the markdown editor

数据孤岛是企业数字化转型遇到的第一道险关

【STL】vector

Compiler optimization (4): inductive variables

YoloV6:YoloV6+Win10---训练自己得数据集

九章云极DataCanvas公司获评36氪「最受投资人关注的硬核科技企业」
随机推荐
Openeuler prize catching activities, to participate in?
SQL common optimization
LeetCode_ 7_ five
Time tools
Automatic classification of defective photovoltaic module cells in electroluminescence images-论文阅读笔记
九章云极DataCanvas公司摘获「第五届数字金融创新大赛」最高荣誉!
IP 工具类
开源重器!九章云极DataCanvas公司YLearn因果学习开源项目即将发布!
PMP每日一练 | 考试不迷路-7.7
干货分享|DevExpress v22.1原版帮助文档下载集合
力扣 2315.统计星号
Cloud component development and upgrading
Ways to improve the utilization of openeuler resources 01: Introduction
Chapter 9 Yunji datacanvas was rated as 36 krypton "the hard core technology enterprise most concerned by investors"
pom. XML configuration file label: differences between dependencies and dependencymanagement
831. KMP字符串
Semantic slam source code analysis
Force buckle 599 Minimum index sum of two lists
力扣 989. 数组形式的整数加法
Throughput