Vector use || 97% T.C || CPP
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    vector<int> sortArrayByParityII(vector<int>& nums) {\n        vector<int> v1,v2;\n        for(int i=0;i<nums.size();i++)\n        {\n            if(nums[i]%2==0)\n            v2.push_back(nums[i]);\n            else\n            v1.push_back(nums[i]);\n        }\n        int l1=0,l2=0;\n        for(int i=0;i<nums.size();i++)\n        {\n            if(i%2==0)\n            nums[i]=v2[l2++];\n            else\n            nums[i]=v1[l1++];\n        }\n\n        return nums;\n    }\n};\n```
['C++']