Tag Archives: spiral traversal on a matrix


1. Spiral Traversal of a 2D matrix Problem: Given a 2D matrix, traverse all it’s elements in a spiral form. Referring the below matrix as an input (Red line shows a spiral traversal), output should be: 1 2 3 4 … Continue reading

Posted in Algorithms | Tagged , , , | Leave a comment