C++simple solution


#1

vector<vector > Solution::prettyPrint(int A) {

int n=2*A-1;
vector<vector<int> > ans;
ans.resize(n);
for(int i=0;i<n;i++){
     for(int j=0;j<n;j++){
     ans[i].push_back(max(abs(A-1-i)+1,abs(A-1-j)+1));
    
}
    
}
return ans;

}