当前位置:网站首页>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
边栏推荐
- 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
- 强化学习-学习笔记8 | Q-learning
- BI的边界:BI不适合做什么?主数据、MarTech?该如何扩展?
- pom. Brief introduction of XML configuration file label function
- Force buckle 88 Merge two ordered arrays
- el-upload上传组件的动态添加;el-upload动态上传文件;el-upload区分文件是哪个组件上传的。
- [sword finger offer] sword finger offer II 012 The sum of left and right subarrays is equal
- MRS离线数据分析:通过Flink作业处理OBS数据
- mysql 的一些重要知识
- Time tools
猜你喜欢
vulnhub之tre1
PMP对工作有益吗?怎么选择靠谱平台让备考更省心省力!!!
Data island is the first danger encountered by enterprises in their digital transformation
开源OA开发平台:合同管理使用手册
LeetCode_ 7_ five
模拟实现string类
ASP. Net kindergarten chain management system source code
Force buckle 2319 Judge whether the matrix is an X matrix
YoloV6:YoloV6+Win10---训练自己得数据集
【STL】vector
随机推荐
torch. nn. functional. Pad (input, pad, mode= 'constant', value=none) record
Classification automatique des cellules de modules photovoltaïques par défaut dans les images de lecture électronique - notes de lecture de thèse
PMP對工作有益嗎?怎麼選擇靠譜平臺讓備考更省心省力!!!
模拟实现string类
强化学习-学习笔记8 | Q-learning
CUDA versions are inconsistent, and errors are reported when compiling apex
Introduction to bit operation
[confluence] JVM memory adjustment
项目经理『面试八问』,看了等于会了
华南X99平台打鸡血教程
openEuler 有奖捉虫活动,来参与一下?
Mysql, sqlserver Oracle database connection mode
最多可以参加的会议数目[贪心 + 优先队列]
MSE API学习
Automatic classification of defective photovoltaic module cells in electroluminescence images-論文閱讀筆記
8 CAS
使用高斯Redis实现二级索引
Detailed explanation of Flink parallelism and slot
mysql 的一些重要知识
Is PMP beneficial to work? How to choose a reliable platform to make it easier to prepare for the exam!!!