class Solution {
public:
vector shuffle(vector& nums, int n) {
vector ans; // create array where we are going to save value
for(int i=0; i<n; i++){
ans.push_back(nums[i]); //starting to add at first
ans.push_back(nums[i+n]); //then we add after at previous
}
return ans;
}
};
class Solution { public: vector shuffle(vector& nums, int n) {
vector ans; // create array where we are going to save value
for(int i=0; i<n; i++){
ans.push_back(nums[i]); //starting to add at first
ans.push_back(nums[i+n]); //then we add after at previous
}
return ans;
}
};