Day 43 of 133
CNN basics: conv, pool, receptive field + DSA Heap
Compute output shapes. Receptive field of stacked 3×3 vs one 7×7.
DSA · NeetCode Heap / Priority Queue
- Design TwitterDSA · Heap / Priority Queue
Interview questions to prep
- Why is a heap the right structure? Could a balanced BST or sorted list work — why is heap better?
- Explain the heap-of-k pattern: keep size k, push new, pop if over k. What's the resulting complexity?
- What does the comparator look like, and how would you tweak it to flip min/max behaviour?
- Find Median From Data StreamDSA · Heap / Priority Queue
Interview questions to prep
- Walk through the two-heaps trick (max-heap left, min-heap right). What invariant ties them?
- What's the space cost over a long-running stream, and how would you bound it (windowed median)?
DL · CNN basics
Interview questions to prep
- Walk me through how a conv layer works step by step.
- Compute the output shape of a 3×3 conv with stride 2 and padding 1 on a 32×32 input.
- What is dilation and where would you use it?
Interview questions to prep
- What is the receptive field of a stack of 3 3×3 convs vs one 7×7 conv?
- Compare max pooling vs average pooling vs strided convolution — when does each fit?
- How would you implement a function that computes receptive field, jump, and start offset across conv/pool layers?
Interview questions to prep
- Why are CNNs called translation-equivariant rather than translation-invariant?
- Where does global pooling at the end of a CNN buy you (approximate) translation invariance?
References & further reading