Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Matrix

2D array problems and matrix algorithms.

Key Concepts Covered

  • Matrix traversal patterns
  • Spiral traversal
  • Matrix rotation
  • Matrix multiplication
  • Searching in sorted matrix
  • Dynamic programming on grids
  • Path finding in matrix
  • Island problems

Tips

  • Draw the matrix and visualize the pattern
  • Watch out for row-major vs column-major order
  • Use direction arrays for 4-directional movement: dx[]={-1,1,0,0}, dy[]={0,0,-1,1}
  • Many matrix problems reduce to graph problems
  • Consider in-place operations to save space