One test case not passed

Only one test case is not passed
Other test cases are succesfully passed

@pratyush63
Kindly tell this one

Hello @Ramitgoel,

Please, share your code. It will be easier for me to detect the issue.

This is my code
@S18ML0016

Hey @Ramitgoel,

Your code is producing correct output only for the square matrices.
Example 1:
4 6
11 12 13 14 15 16
21 22 23 24 25 26
31 32 33 34 35 36
41 42 43 44 45 46
Your Output:
11, 21, 31, 41, 42, 43, 44, 45, 46, 36, 26, 16, 15, 14, 13, 12, 22, 32, 33, 34, 35, 25, 24, 23, 24, END
Expected Output:
11, 21, 31, 41, 42, 43, 44, 45, 46, 36, 26, 16, 15, 14, 13, 12, 22, 32, 33, 34, 35, 25, 24, 23, END

Example 2:
4 3
11 12 13
21 22 23
31 32 33
41 42 43
Your Output:
11, 21, 31, 41, 42, 43, 33, 23, 13, 12, END
Expected Output:
11, 21, 31, 41, 42, 43, 33, 23, 13, 12, 22, 32, END

Please watch the video:
CPP Webinar : 2-D Arrays, Strings

Reason:
You have missed the boundary case Sir has explained at 1:59:47.

Let me know, if you still face any issue.
Hope, this would help.
Give a like if you are satisfied.

1 Like

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.