当前位置:网站首页>LeetCode-922. Sort Array By Parity II
LeetCode-922. Sort Array By Parity II
2022-08-10 16:04: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
题解:
边栏推荐
猜你喜欢
Spike project harvest
【教程】HuggingFace的Optimum组件已支持加速Graphcore和英特尔Habana芯片
FP6378AS5CTR SOT - 23-5 effective 1 mhz2a synchronous buck regulator
mysql按月查询统计(统计近12个月的项目个数)
产品说明丨如何使用MobPush快速创建应用
Colocate Join :ClickHouse的一种高性能分布式join查询模型
软件测试用例篇
全志V853开发板移植基于 LVGL 的 2048 小游戏
Cesium Quick Start 4-Polylines primitive usage explanation
使用 ABAP 正则表达式解析 uuid 的值
随机推荐
Taurus.MVC WebAPI 入门开发教程4:控制器方法及参数定义、获取及基础校验属性【Require】。
推荐几款最好用的MySQL开源客户端,建议收藏!
cmake 小技巧 记录
WinUI 3 Fundamentals 5小时教学视频
TestLink Export Use Case Transformation Tool
APP automation testing with Uiautomator2
可以在家干的兼职都有哪些呢?做自媒体怎么样?
Spike project harvest
8月Meetup | “数据调度+分析引擎”解锁企业数字化转型之路
二维费用背包问题的解题套路
Yi Gene|In-depth review: epigenetic regulation of m6A RNA methylation in brain development and disease
Common conventions such as common SQL and API interfaces
LeetCode-692. Top K Frequent Words
photoshop入门教程
虚拟电厂可视化大屏,深挖痛点精准减碳
Data Types and Integer Storage
关于Web渗透测试需要知道的一切:完整指南
持续集成实战 —— Jenkins自动化测试环境搭建
异形屏为led显示行业带来更多希望
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