Day 2 of 133

Distributions you'll see in interviews + DSA Arrays/Hashing

Bernoulli/Binomial/Poisson/Normal/Exponential. CLT intuition. More NeetCode arrays/hashing.

DSA · NeetCode Arrays & Hashing

  • Group AnagramsDSA · Arrays & Hashing

    Interview questions to prep

    1. What's your hash key — sorted string vs character-count tuple? Trade-offs?
    2. How does this scale to a streaming input where new strings keep arriving?
  • Top K Frequent ElementsDSA · Arrays & Hashing

    Interview questions to prep

    1. Walk through bucket sort (O(n)) vs heap of k (O(n log k)) — when does each win?
    2. What if k is much larger than the unique-element count?
  • Encode And Decode StringsDSA · Arrays & Hashing

    Interview questions to prep

    1. What's the time and space complexity? Where can you tighten it?
    2. Walk through edge cases: empty input, single element, all duplicates, negatives.
    3. Why is a hash map / hash set the right structure here? When would a sorted structure beat it?

Math · Distributions you'll see in interviews

  • Interview questions to prep

    1. When should you model click events as Bernoulli vs Poisson?
    2. Derive the mean and variance of a Binomial(n, p).
    3. Why does the Poisson approximate the Binomial when n is large and p small?
  • Interview questions to prep

    1. Why is the Normal so common — what's the Central Limit Theorem intuition?
    2. When would you pick a Beta distribution over a Normal?
    3. How is the Exponential distribution memoryless, and why does that matter for modeling time-to-event?
  • Interview questions to prep

    1. State the Central Limit Theorem precisely and explain what it does NOT say.
    2. How does the CLT justify using normal-based confidence intervals on means?
    3. When does the CLT fail or converge slowly?

References & further reading