Day 6 of 133
Sampling, bias, resampling — and pattern review
Random/stratified/cluster/importance sampling. Selection/survivorship bias.
DSA · NeetCode Sliding Window
- Best Time TO Buy And Sell StockDSA · Sliding Window
Interview questions to prep
- Walk through the one-pass min-so-far trick. Why is it correct?
- What if you can buy and sell unlimited times? What about with a cooldown or fee?
- Longest Substring Without Repeating CharactersDSA · Sliding Window
Interview questions to prep
- Why is this a sliding window? What's the invariant inside the window?
- What if the alphabet is huge (Unicode) vs tiny (ASCII)? Does that change your data structure?
Math · Sampling & survey design
Interview questions to prep
- Compare simple random sampling vs stratified sampling — when does stratification reduce variance?
- What is importance sampling and where does it show up in ML?
Interview questions to prep
- Give an example where selection bias silently broke a model deployment.
- What is survivorship bias and where does it hurt model evaluation?
Interview questions to prep
- What's the difference between bootstrapping for uncertainty vs resampling for imbalance?
- When does oversampling the minority class help and when does it leak?
References & further reading
- StatQuest — Statistics & ML playlists ↗YouTube
- imbalanced-learn user guide ↗scikit-learn-contrib
- NeetCode roadmap (full 250) ↗NeetCode