I have two dimentional matrix nxm. I want to read the elements of first line and reach to its end then revert the element of next line read its elements then revert next line..... e.g 4x4 matrix
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
as
1 2 3 4
8 7 6 5
12 11 10 9
16 15 14 13
I have applied if and else condition on (n<=?m) and detect the start of new line by (n>m) but how to find end of line?
Could you post what you tried here? Could help people here understand the problem better.
You mentioned applying if
condition. Could you show how you used it?
Last updated: Oct 04 2023 at 20:01 UTC