当前位置:网站首页>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
边栏推荐
- Version selection of boot and cloud
- R language ggplot2 visualization: use the ggecdf function of ggpubr package to visualize the grouping experience cumulative density distribution function curve, and the linetype parameter to specify t
- R language ggplot2 visualization: use the ggqqplot function of ggpubr package to visualize the QQ graph (Quantitative quantitative plot)
- Force buckle 2315 Statistical asterisk
- 831. KMP字符串
- JVM class loading mechanism
- Open source heavy ware! Chapter 9 the open source project of ylarn causal learning of Yunji datacanvas company will be released soon!
- Introduction to bit operation
- pom. XML configuration file label: differences between dependencies and dependencymanagement
- R language uses ggplot2 function to visualize the histogram distribution of counting target variables that need to build Poisson regression model, and analyzes the feasibility of building Poisson regr
猜你喜欢

Is PMP beneficial to work? How to choose a reliable platform to make it easier to prepare for the exam!!!

openEuler 资源利用率提升之道 01:概论

使用高斯Redis实现二级索引

模拟实现string类

PMP对工作有益吗?怎么选择靠谱平台让备考更省心省力!!!

Cloud component development and upgrading

剑指 Offer II 013. 二维子矩阵的和

整型int的拼接和拆分

Automatic classification of defective photovoltaic module cells in electroluminescence images-论文阅读笔记

开源OA开发平台:合同管理使用手册
随机推荐
The DBSCAN function of FPC package of R language performs density clustering analysis on data, checks the clustering labels of all samples, and the table function calculates the two-dimensional contin
pom. XML configuration file label: differences between dependencies and dependencymanagement
Browse the purpose of point setting
el-upload上传组件的动态添加;el-upload动态上传文件;el-upload区分文件是哪个组件上传的。
Force buckle 2319 Judge whether the matrix is an X matrix
R language ggplot2 visualization: use the ggecdf function of ggpubr package to visualize the grouping experience cumulative density distribution function curve, and the linetype parameter to specify t
YoloV6:YoloV6+Win10---训练自己得数据集
Force buckle 1232 Dotted line
vulnhub之school 1
Chapter 9 Yunji datacanvas was rated as 36 krypton "the hard core technology enterprise most concerned by investors"
The boundary of Bi: what is bi not suitable for? Master data, Martech? How to expand?
LeetCode_7_5
Some arrangements about oneself
[RT thread env tool installation]
ASP. Net learning & ASP's one word
Time tools
8 CAS
Force buckle 88 Merge two ordered arrays
Ways to improve the utilization of openeuler resources 01: Introduction
A pot of stew, a collection of common commands of NPM and yarn cnpm