I am thinking about what's the modern way to append a column to a 2d vector.
I have attempted the following approaches:
1. Naive way:

```
void insert_col(vector<vector<int>>& data, vector<int>& newCol){
    if(newCol.size()!=data.size()){
        return ;
    }
    for(int i = 0; i < data.size(); i++){
        data[i].push_back(newCol[i]);
    }
}

```

Second attempt that does not work:

```
transform(data.begin(), data.end(), newCol.begin(), /*not sure about this part*/, [](vector<int>& row, int colVale)->int{return colVale;});

```

The idea is to use transform to iterate both 2d vector and the column to be inserted. I am wondering if there's a way to append at the end of each row?

3. Third attempt:

reinsert each row into the data.begin() which would work but probably not efficient.

Any other efficient solution would be highly appreciated. Thanks!