当前位置:网站首页>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
题解:
边栏推荐
猜你喜欢

storage of data in memory

Meaning and names of 12 nautical miles, 24 nautical miles and 200 nautical miles

一文带你了解 HONOR Connect

易基因|深度综述:m6A RNA甲基化在大脑发育和疾病中的表观转录调控作用

Cesium快速上手4-Polylines图元使用讲解

秒杀项目收获

【21天学习挑战赛】直接选择排序

产品说明丨如何使用MobPush快速创建应用

Community News——Congratulations to Dolphin Scheduling China User Group for 9 new "Community Administrators"

It is reported that the original Meitu executive joined Weilai mobile phone, the top product may exceed 7,000 yuan
随机推荐
秒杀项目收获
全志V853开发板移植基于 LVGL 的 2048 小游戏
pm2 static file service
Servlet简单项目操作
虚拟电厂可视化大屏,深挖痛点精准减碳
MySQL batch update and batch update method of different values of multiple records
Zotero 开源文献管理工具
Basic learning of XML
TestLink Export Use Case Transformation Tool
SWIG tutorial "four" - package of go language
10 advanced functions of scala
【服务器数据恢复】raid5崩溃导致lvm信息和VXFS文件系统损坏的数据恢复案例
拆分整数为2的幂次项和 → 理解多重背包问题二进制优化的核心思想
程序调试介绍及其使用
“低代码”编程或将是软件开发的未来
异地多活方法论
C#去水印软件源代码
FP6378AS5CTR SOT-23-5 高效1MHz2A同步降压调节器
【芯片】人人皆可免费造芯?谷歌开源芯片计划已释放90nm、130nm和180nm工艺设计套件
JS 从零手写实现一个bind方法