Day 4 of 133

Confidence intervals + bootstrapping + DSA Two Pointers

CIs, bootstrap, frequentist vs Bayesian; start the Two Pointers pattern.

DSA · NeetCode Two Pointers

  • Valid PalindromeDSA · Two Pointers

    Interview questions to prep

    1. How do you handle non-alphanumerics and case — what's your filter logic?
    2. What if the string is huge and streamed — can you process it without loading it all?
  • Interview questions to prep

    1. What invariant do the two pointers preserve, and why does that prove correctness?
    2. Why is this O(n) and not O(n²) — what guarantees each element is visited a bounded number of times?
    3. Walk through edge cases: empty input, all duplicates, sorted vs unsorted.
  • 3sumDSA · Two Pointers

    Interview questions to prep

    1. How do you avoid duplicate triples without a set — what's the skip-duplicates pattern?
    2. Generalize to k-sum: what's the recursion, and what's the complexity?

Math · Confidence intervals & bootstrapping

  • Interview questions to prep

    1. What does a 95% confidence interval actually mean?
    2. Why is a 95% CI NOT 'a 95% probability the true value is in this range' under frequentist statistics?
    3. How would you build a CI for a click-through rate with N=1,000?
  • Interview questions to prep

    1. When is bootstrapping more useful than a parametric CI?
    2. Walk through bootstrapping a CI for the median.
    3. How does a permutation test compare to a t-test when assumptions are violated?
  • Interview questions to prep

    1. Compare frequentist confidence intervals vs Bayesian credible intervals.
    2. When does a Bayesian credible interval communicate uncertainty more naturally?

References & further reading