当前位置:网站首页>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
题解:
边栏推荐
猜你喜欢
随机推荐
metaForce佛萨奇2.0系统开发功能逻辑介绍
FP6378AS5CTR SOT-23-5 高效1MHz2A同步降压调节器
FP6378AS5CTR SOT - 23-5 effective 1 mhz2a synchronous buck regulator
第贰章模块大全之《 collections模块》
【每日一题】【leetcode】26. 链表-链表中倒数第k个节点
photoshop入门教程
Introduction to the functional logic of metaForce Fosage 2.0 system development
TestLink Export Use Case Transformation Tool
【21天学习挑战赛】折半查找
一文带你了解 HONOR Connect
MySQL命令行导出导入数据库
易观千帆银行用户体验中心:聚焦银行APP用户体验
数据治理项目成功的要点,企业培养数据要把握好关键环节
机器学习天降福音!数据科学家、Kaggle大师发布「ML避坑宝典」
智为链接,慧享生活,荣耀智慧服务,只为 “懂” 你
【每日一题】【leetcode】25. 数组-旋转数组的最小数字
Kubernetes kube-proxy工作原理
Servlet简单项目操作
利用SparkLauncher 提交Job
SYM32——RTC实时时钟程序讲解









