Day 40 of 133
DL loss functions + DSA Trees
Cross-entropy, label smoothing, focal, contrastive (InfoNCE), CTC.
DSA · NeetCode Trees
- Validate Binary Search TreeDSA · Trees
Interview questions to prep
- Why is checking 'left.val < node.val < right.val' insufficient — what's the right invariant?
- Compare in-order traversal vs min/max-bound recursion.
- Kth Smallest Element IN A BstDSA · Trees
Interview questions to prep
- Compare BFS vs DFS for this problem — which fits, and what's the iterative version?
- What's the recursion's space cost on the stack, and how would you go iterative if you needed O(log n)?
- What's the relationship between this problem's invariant and the BST property (if any)?
DL · Loss functions in deep learning
Interview questions to prep
- Why use cross-entropy instead of MSE for classification?
- What is label smoothing and why does it help calibration?
Interview questions to prep
- When does focal loss help, and how is it different from class weighting?
- What is contrastive loss (InfoNCE) and where is it used?
Interview questions to prep
- Walk me through CTC loss for speech recognition.
- Why does CTC need a blank token, and how does the alignment marginalization work?
References & further reading