当前位置:网站首页>LeetCode-922. Sort Array By Parity II
LeetCode-922. Sort Array By Parity II
2022-08-10 15:36:00 【51CTO】
Given an array A
of non-negative integers, half of the integers in A are odd, and half of the integers are even.
Sort the array so that whenever A[i]
is odd, i
is odd; and whenever A[i]
is even, i
is even.
You may return any answer array that satisfies this condition.
Example 1:
Note:
-
2 <= A.length <= 20000
-
A.length % 2 == 0
-
0 <= A[i] <= 1000
题解:
边栏推荐
- Taurus.MVC WebAPI 入门开发教程4:控制器方法及参数定义、获取及基础校验属性【Require】。
- 【服务器数据恢复】raid5崩溃导致lvm信息和VXFS文件系统损坏的数据恢复案例
- const-modified pointer variable (detailed)
- HUAWEI CLOUD DevCloud received the highest-level certification of the first batch of cloud-native technology architecture maturity assessments by the China Academy of Information and Communications Te
- Chapter one module of the re module,
- Yann LeCun转推:参数减少50倍,性能还更好,MetaAI推出Atlas信息检索模型
- Problem solving-->Online OJ (19)
- C#去水印软件源代码
- FFmpeg 交叉编译
- 智为链接,慧享生活,荣耀智慧服务,只为 “懂” 你
猜你喜欢
随机推荐
Based on Azuki Series: NFT Valuation Analysis Framework "DRIC"
一个 ABAP Development Tool 自定义 service endpoint 的测试工具
为什么中国的数字是四位一进,而西方的是三位一进?
关于“算力”,这篇文章值得一看
Detailed understanding of all built-in functions (Part 2)
scala 基础篇
redis 源码源文件说明
APP automation testing with Uiautomator2
持续集成实战 —— Jenkins自动化测试环境搭建
功能测试vs.非功能测试:能否非此即彼地进行选择?
电商秒杀项目收获(二)
Oracle数据库备份dmp文件太大,有什么办法可以在备份的时候拆分成多个dmp吗?
全部内置函数详细认识(中篇)
C#去水印软件源代码
全志V853开发板移植基于 LVGL 的 2048 小游戏
fastposter v2.9.1 程序员必备海报生成器
pm2 static file service
systemui shield notification bar
第贰章模块大全之《 collections模块》
关于Web渗透测试需要知道的一切:完整指南