My test case is correct but while submitting the code it is displaying test cases wrong. Please advice the relevant changes i have to do.
Arrays-wave print column wise
Hi @prkfoxxx
In this question you have to print columns whose index is divisible by 2 from top to bottom and other columns from bottom to top. For example if there are 4 columns then you have to print 0th and 2nd column from top to bottom and 1st and 3rd column from bottom to top.
Here is your corrected code :
I facing the problem when submitting the code although the output is correct but not able to pass any test cases can I know the reasons behined this?
Hi @Vikaspal
The test cases are showing wrong ans because you have not include space after “,”
cout << arr[i][j] <<","; make this line at both places as cout << arr[i][j] <<", ";
then it will pass all test cases
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.