first element of each row is the size of that row
int [ ] [ ] arr = new int [ ] [ ] { new int [ ] { 3 , 2 , 3 , 5 } , new int [ ] { 2 , 7 , - 1 } , new int [ ] { 2 , 8 , 10 } , new int [ ] { 4 , 5 , 2 , 6 , 1 } , new int [ ] { 3 , 2 , 3 , - 2 } } ; Console . Write ( " Maximum ▁ sum ▁ can ▁ be ▁ " + " obtained ▁ is ▁ : ▁ " + maxSum ( arr ) + " STRNEWLINE " ) ; } }