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