Day 1 of 133

Probability fundamentals + DSA Arrays/Hashing kickoff

Open the loop: probability axioms, conditional probability, Bayes' theorem; ease into the easiest NeetCode pattern.

DSA · NeetCode Arrays & Hashing

  • Contains DuplicateDSA · Arrays & Hashing

    Interview questions to prep

    1. Compare hash-set O(n)/O(n) vs sort-and-scan O(n log n)/O(1) — when do you pick each?
    2. What if the array doesn't fit in memory — how would you detect duplicates with limited RAM?
  • Valid AnagramDSA · Arrays & Hashing

    Interview questions to prep

    1. Compare sorting (O(n log n)) vs counting-array (O(n), 26 buckets) — when do you pick each?
    2. What if the strings include Unicode — does your counting-array still work?
  • Two SumDSA · Arrays & Hashing

    Interview questions to prep

    1. Walk through the brute-force O(n²), then explain how the hash map drops it to O(n).
    2. What if the array is sorted — can you do better in space (two-pointer, O(1))?
    3. What if duplicates are allowed and you need ALL pairs, not just one?

Math · Probability fundamentals

  • Interview questions to prep

    1. What's the difference between joint, marginal and conditional probability — give a worked example?
    2. When is independence the same as conditional independence? Why does the distinction matter for Naive Bayes?
    3. Explain the law of total probability with a churn-prediction example.
  • Interview questions to prep

    1. Walk through Bayes on a screening test (1% prevalence, 95% sensitivity, 90% specificity) — why is positive predictive value still low?
    2. How would you use Bayes to update belief during an A/B test as data arrives?
    3. When does using a strong prior hurt vs help in production ML?
  • Interview questions to prep

    1. Two children: at least one is a girl. What's the probability the other is also a girl? Defend your answer.
    2. Why is P(disease|positive) ≠ sensitivity in general?
    3. Explain the base-rate fallacy with a hiring or fraud example.

References & further reading