M
mail2sandeepnl
Hi
how to spirally access 2 d array,
ex:
for input array
1 2 3 4
5 6 7 8
9 10 11 12
output should be like : 1,2,3,4,8,12,11,10,9,5,6,7
i thought of some iterative method, but not satisfied, is there any
recursive solution for this kind of problem ?
how to spirally access 2 d array,
ex:
for input array
1 2 3 4
5 6 7 8
9 10 11 12
output should be like : 1,2,3,4,8,12,11,10,9,5,6,7
i thought of some iterative method, but not satisfied, is there any
recursive solution for this kind of problem ?