[C++] 2 Pointers in Place Solution Explained, ~100% Time, ~70% Space
Since order does not matter here, we can afford to proceed in linear time with 2 pointers: i and j, respectively set to the far left to hunt odd numbers and to 
Since order does not matter here, we can afford to proceed in linear time with 2 pointers: `i` and `j`, respectively set to the far left to hunt odd numbers and to the far right to hunt even numbers.\n\nOnce both of them are positioned, and assuming it is still `i <= j`, I proceed to swap the values of their underlying cells.\n\nRinse and repeat, then return the array itself :)\n\nThe code:\n\n```cpp\nclass Solution {\npublic:\n    vector<int> sortArrayByParity(vector<int>& v) {\n        // initialising 2 pointers\n        int i = 0, j = v.size() - 1, len = v.size();\n        if (len < 2) return v;\n        while (true) {\n            // moving to the first odd number with i\n            while (i < len && !(v[i] % 2)) i++;\n            // moving to the first even number with j\n            while (j && v[j] % 2) j--;\n\t\t\t// checking if we are still in a valid scenario, otherwise we exit\n            if (i >= j) break;\n\t\t\t// if so, we swap and update i and j\n            swap(v[i++], v[j--]);\n        }\n        return v;\n    }\n};\n```
['Two Pointers', 'C', 'C++']