OJ lintcode 奇偶分割数组

分割一个整数数组,使得奇数在前偶数在后。
您在真实的面试中是否遇到过这个题?
Yes
样例
给定 [1, 2, 3, 4],返回 [1, 3, 2, 4]。

class Solution {
public:
    /**
     * @param nums: a vector of integers
     * @return: nothing
     */
    void partitionArray(vector &nums) {
        // write your code here
        vector v1;
        vector v2;

        for(int i=0;i

你可能感兴趣的:(OJ lintcode 奇偶分割数组)