c++ easy two pointer solution , clean code
```\nclass Solution {\npublic:\n    vector sortArrayByParityII(vector& nums) \n    {\n     vectorans;\n        vectoreven;\n        vectorodd;\n        for(int 
```\nclass Solution {\npublic:\n    vector<int> sortArrayByParityII(vector<int>& nums) \n    {\n     vector<int>ans;\n        vector<int>even;\n        vector<int>odd;\n        for(int i=0;i<nums.size();i++){\n            if(nums[i]%2==0){\n                even.push_back(nums[i]);\n            }\n            if(nums[i]%2==1){\n                odd.push_back(nums[i]);\n            }\n        }\n            int j=0;\n            int k=0;\n            for(int i=0;i<nums.size();i++){\n                if(i%2==0){\n                    ans.push_back(even[j]);\n                    j++;\n                }\n                else{\n                    ans.push_back(odd[k]);\n                    k++;\n                }\n            }\n return ans;\n        \n    }\n};\n \n           \n
['Two Pointers', 'C']