Day 24 of 133

SVM, kNN, Naive Bayes + DSA Linked List

Kernel trick, curse of dimensionality, generative vs discriminative.

DSA · NeetCode Linked List

  • Linked List CycleDSA · Linked List

    Interview questions to prep

    1. Walk through Floyd's tortoise & hare — why must they meet inside the cycle?
    2. How do you find the start of the cycle (LC 142) once you've detected one?
  • Find The Duplicate NumberDSA · Linked List

    Interview questions to prep

    1. Walk through your pointer hazards — what breaks if you lose track of the head or a prev pointer?
    2. Can you do this in-place (O(1) extra space)? What's the trick?
    3. How would you detect / handle a cycle, and prove your method's correctness?

ML · SVM, kNN, Naive Bayes

  • Interview questions to prep

    1. What's the geometric intuition behind the max-margin SVM?
    2. Explain the kernel trick — why it lets us work in infinite-dimensional spaces without computing them.
    3. When would you NOT use an SVM today?
  • Interview questions to prep

    1. Why does kNN degrade in high dimensions (curse of dimensionality)?
    2. How would you choose k and the distance metric for kNN?
  • Interview questions to prep

    1. Why does Naive Bayes still work despite the unrealistic independence assumption?
    2. Compare generative vs discriminative classifiers using NB and Logistic Regression.

References & further reading