giving me run time error my program. could u help to find out…?
Diagonal traversal
@amaaanahmedkhan987,
You haven’t initialised matrix
vector to appropriate size.
Try this
vector<vector<int>> matrix(n, vector<int>(m));
@amaaanahmedkhan987,
Because on line 14, you are going out of bounds (may be row or col is greater than the dimension of matrix). You can dry run on sample test case.
pls modify my code for me i am not able to correct my mistake
i am not able to modify my code … could u modify my code
@amaaanahmedkhan987,
It is a very simple program, you should be able to do it itself, at least the dry run. Please share me an image of your dry run on paper and pen.
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.