To be used in DP problems: vector<vector<int>>dp; //global init dp = vector<vector<int>>(n,vector<int>(m,0)); // local init for test cases where, n, m = dimensions of matrix