Posts

Showing posts with the label matrix

Matrix Spiral Traversing

This post gives solution for 2D Matrix Spiral Traversing . package testproject; /** * * @author Yogesh */ public class SpriralTraverse {     public static void main(String[] args){         //Sample Array         char[][] array = {{'1','2','3','4','5'},                           {'L','1','2','3','6'},                           {'K','E','1','4','7'},                           {'J','D','2','5','8'},                           {'I','C','3','6','9'},                           {'H','B','4','7','0'},                           {'G','A','9','8','A'},                           {'F','E','D','C','B'}};