diff --git a/Code/C++/row_wise_sum.cpp b/Code/C++/row_wise_sum.cpp index 2dd375916..ef692d10e 100644 --- a/Code/C++/row_wise_sum.cpp +++ b/Code/C++/row_wise_sum.cpp @@ -1,5 +1,7 @@ -/* ROW WISE SUM OF A 2D ARRAY : -For a given 2-D integer type array of size (N x M), find and print the sum of each of the row elements in a single line, separated by a single space.*/ +/* +ROW WISE SUM OF A 2D ARRAY : +For a given 2-D integer type array of size (N x M), find and print the sum of each of the row elements in a single line, separated by a single space. +*/ #include using namespace std; @@ -37,7 +39,8 @@ int main() row_wise_sum(&arr[0][0],rows,cols); return 0; } -/* EXAMPLE 1: +/* +EXAMPLE 1: Enter the number of rows and columns:3 4 Enter the elements of the 2D array: 1 2 3 4 @@ -56,4 +59,5 @@ Row-wise Sum: 6 12 16 Time Complexity - O(N * M) -Space Complexity - O(1) */ +Space Complexity - O(1) +*/