you give array rowsum colsum nonnegative integer rowSumi sum element ith row colsumj sum element jth column 2D matrix in word know elements matrix know sum row columnfind matrix nonnegative integer size rowsumlength x colsumlength satisfie rowsum colsum requirementsreturn 2D array represent matrix fulfill requirement its guarantee matrix fulfill requirement exist Example 1input rowsum 38 colsum 47Output 30 17explanation 0th row 3 0 3 rowsum01st row 1 7 8 rowsum10th column 3 1 4 colsum01st column 0 7 7 colsum1the row column sum match matrix element nonnegativeanother possible matrix 12 35example 2input rowsum 5710 colsum 868output 050 610 208 Constraints1 rowsumlength colsumlength 5000 rowSumi colsumi 108sumrows sumcolumn