Python3 代码
class Solution(object):
def reOrderArray(self, array):
"""
:type array: List[int]
:rtype: void
"""
i = 0
j = len(array) - 1
while i < j:
while array[i] % 2 == 1:
i += 1
while array[j] %2 == 0:
j -= 1
if i < j:
array[i], array[j] = array[j], array[i]