Skip to content

Multi Array

Mission Peace edited this page Aug 1, 2016 · 3 revisions
  1. Given a boolean matrix mat[M][N] of size M X N, modify it such that if a matrix cell mat[i][j] is 1 (or true) then make all the cells of ith row and jth column as 1 - Fill2DMatrixWith1.java
  2. Design game of life - GameOfLife.java
  3. Find the length of the longest chain of consecutive integers in an unsorted 2D square array (non-diagonal) - LongestConsecutiveIntegerInUnsorted2DArray.java
  4. Given a 2D array, create a new 2D array which joins first row elements with every other element from second row onwards - MatrixCalculation.java
  5. Given a 2D array, find sum of all rectangular and square sub matrix - MatrixFindAllSubSquareRectangleMatrix.java
  6. Print a 2D array in diagonal format - MatrixInDiagonalOrder.java
  7. Create a 2D array of alternating Xs and 0s rectangles - MatrixOf0sAnd1s.java
  8. Move in 2D array as per cell value - MoveCellPerCellValue.java
  9. Rotate image by 90 degree - RotateImage.java
  10. Given a n by n board where n is of form 2k where k >= 1 (Basically n is a power of 2 with minimum value as 2). The board has one missing cell (of size 1 x 1). Fill the board using L shaped tiles. TilingProblem.java
  11. Print matrix in spiral way - SpiralPrinting.java
  12. Generate spiral matrix from 1 to n^2 - SpiralGeneration.java
Clone this wiki locally