1To be used in DP problems:
2
3vector<vector<int>>dp; //global init
4
5dp = vector<vector<int>>(n,vector<int>(m,0)); // local init for test cases
6where,
7 n, m = dimensions of matrix
1// Initializing 2D vector "vect" with
2// values
3vector<vector<int> > vect{ { 1, 2, 3 },
4 { 4, 5, 6 },
5 { 7, 8, 9 } };