What is wrong in this sol?


#1

vector<vector > Solution::solve(vector< int> &A, vector< int> &B) {
int n=A.size();
int m=B.size();
int k;
vector< vector< int> >v( m , vector (n, 0));
for(int i=0;i<m;i++){
k=0;
// cout<<B[i]<<“a”;
for(int j=B[i];j<n;j++,k++){
v[i][k]=A[j];
// cout<<v[i][k];
}
for(int j=0;j<B[i];j++,k++){
v[i][k]=A[j];
// cout<<v[i][k];
}
// cout<<" ";
}
return v;
}