Day 8 of 133

Linear algebra essentials + DSA Math & Geometry

Vectors, matrices, dot product, norms — the operations under everything.

DSA · NeetCode Math & Geometry

  • Rotate ImageDSA · Math & Geometry

    Interview questions to prep

    1. Where does integer overflow / negative input / zero hide here, and how do you guard against it?
    2. Can you derive a closed-form solution, and how does it compare to the iterative one?
    3. Walk through edge cases: 0, 1, max int, min int, negative input.
  • Spiral MatrixDSA · Math & Geometry

    Interview questions to prep

    1. Where does integer overflow / negative input / zero hide here, and how do you guard against it?
    2. Can you derive a closed-form solution, and how does it compare to the iterative one?
    3. Walk through edge cases: 0, 1, max int, min int, negative input.
  • Set Matrix ZeroesDSA · Math & Geometry

    Interview questions to prep

    1. Where does integer overflow / negative input / zero hide here, and how do you guard against it?
    2. Can you derive a closed-form solution, and how does it compare to the iterative one?
    3. Walk through edge cases: 0, 1, max int, min int, negative input.

Math · Linear algebra essentials

  • Interview questions to prep

    1. What does the dot product mean geometrically?
    2. Why is the transpose used in y = Xθ vs y = θX?
    3. How does cosine similarity relate to the dot product?
  • Rank, null space, column spaceStatisticsKhan Academy

    Interview questions to prep

    1. What is the rank of a matrix and why does it matter for solving Ax = b?
    2. What does it mean for a feature matrix X to be rank-deficient, and how does it affect linear regression?
  • Interview questions to prep

    1. Compare L1, L2, and L-infinity norms — when do you use each?
    2. How does the choice of norm change the geometry of regularization?

References & further reading