Day 11 of 133
Calculus & gradients + DSA Bit Manipulation kickoff
Chain rule, partial derivatives, Jacobians, Hessians — what backprop will use.
DSA · NeetCode Bit Manipulation
- Single NumberDSA · Bit Manipulation
Interview questions to prep
- Why does XOR-all give the unique element when others appear twice?
- How does this generalize when others appear three times (LC 137)?
- Number OF 1 BitsDSA · Bit Manipulation
Interview questions to prep
- Walk me through the bit trick used here, bit by bit on a small input.
- Why XOR / AND / shift specifically — what property of that operation does the problem exploit?
- What's the complexity in terms of bits (often O(32) → O(1)), and where could that break for big-int?
- Counting BitsDSA · Bit Manipulation
Interview questions to prep
- Walk me through the bit trick used here, bit by bit on a small input.
- Why XOR / AND / shift specifically — what property of that operation does the problem exploit?
- What's the complexity in terms of bits (often O(32) → O(1)), and where could that break for big-int?
Math · Calculus & gradients
Interview questions to prep
- Derive the chain rule for f(g(x)) and apply it to a 2-layer neural network.
- What's the difference between a partial derivative and a directional derivative?
Interview questions to prep
- What does the gradient vector represent geometrically?
- When would you need the full Jacobian or Hessian in ML?
- Why do second-order methods (Newton) rarely scale to deep nets?
Interview questions to prep
- Explain backpropagation as the chain rule applied to a computation graph.
- Why do vanishing gradients happen, and how do ReLU / residual connections help?
References & further reading
- 3Blue1Brown — Essence of Calculus ↗3Blue1Brown
- Khan Academy — Linear Algebra ↗Khan Academy
- NeetCode roadmap (full 250) ↗NeetCode