当前位置:网站首页>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
边栏推荐
- Force buckle 1232 Dotted line
- openEuler 有奖捉虫活动,来参与一下?
- Force buckle 674 Longest continuous increasing sequence
- Simulate the implementation of string class
- Introduction to bit operation
- Navicat连接2002 - Can‘t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock‘解决
- 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
- TS快速入门-泛型
- torch.nn.functional.pad(input, pad, mode=‘constant‘, value=None)记录
- Mysql, sqlserver Oracle database connection mode
猜你喜欢
el-upload上传组件的动态添加;el-upload动态上传文件;el-upload区分文件是哪个组件上传的。
九章云极DataCanvas公司获评36氪「最受投资人关注的硬核科技企业」
Leetcode force buckle (Sword finger offer 36-39) 36 Binary search tree and bidirectional linked list 37 Serialize binary tree 38 Arrangement of strings 39 Numbers that appear more than half of the tim
vulnhub之tre1
最多可以参加的会议数目[贪心 + 优先队列]
使用高斯Redis实现二级索引
华南X99平台打鸡血教程
PMP practice once a day | don't get lost in the exam -7.7
8 CAS
Le PGR est - il utile au travail? Comment choisir une plate - forme fiable pour économiser le cœur et la main - d'œuvre lors de la préparation de l'examen!!!
随机推荐
开源OA开发平台:合同管理使用手册
LeetCode力扣(剑指offer 36-39)36. 二叉搜索树与双向链表37. 序列化二叉树38. 字符串的排列39. 数组中出现次数超过一半的数字
Ways to improve the utilization of openeuler resources 01: Introduction
ASP.NET学习& asp‘s one word
Chapter 9 Yunji datacanvas was rated as 36 krypton "the hard core technology enterprise most concerned by investors"
最多可以参加的会议数目[贪心 + 优先队列]
项目经理『面试八问』,看了等于会了
MIT科技评论文章:围绕Gato等模型的AGI炒作可能使人们忽视真正重要的问题
九章云极DataCanvas公司摘获「第五届数字金融创新大赛」最高荣誉!
torch. nn. functional. Pad (input, pad, mode= 'constant', value=none) record
Visual Studio 插件之CodeMaid自动整理代码
The boundary of Bi: what is bi not suitable for? Master data, Martech? How to expand?
Automatic classification of defective photovoltaic module cells in electroluminescence images-论文阅读笔记
Compiler optimization (4): inductive variables
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
equals 方法
Sword finger offer II 013 Sum of two-dimensional submatrix
LeetCode_7_5
CSDN语法说明
Force buckle 599 Minimum index sum of two lists