Day 10 of 133

SVD, PCA, t-SNE, UMAP + DSA Math & Geometry finish

Workhorse decomposition, dimensionality reduction, when to read which plot.

DSA · NeetCode Math & Geometry

  • Multiply StringsDSA · 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.
  • Detect SquaresDSA · 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 · SVD & PCA

  • Interview questions to prep

    1. Explain SVD geometrically: X = UΣVᵀ.
    2. Why does SVD always exist while eigendecomposition does not?
    3. Where is SVD used in recommender systems and embeddings?
  • Interview questions to prep

    1. Derive PCA as maximizing variance OR minimizing reconstruction error — they give the same answer. Why?
    2. When does PCA fail (non-Gaussian, non-linear, scale-sensitive)?
    3. Compare PCA vs t-SNE vs UMAP — when do you pick each?
  • Interview questions to prep

    1. Why are distances in a t-SNE plot misleading?
    2. When would you choose UMAP over t-SNE?

References & further reading