Day 25 of 133
Clustering: k-means, DBSCAN, hierarchical + DSA Linked List
Lloyd's algorithm, cluster count selection, when DBSCAN beats k-means.
DSA · NeetCode Linked List
- Lru CacheDSA · Linked List
Interview questions to prep
- Why hash map + doubly linked list — what does each give you in O(1)?
- How would you make this thread-safe? What's the simplest correct approach?
- Merge K Sorted ListsDSA · Linked List
Interview questions to prep
- Compare divide-and-conquer (pairwise merge, O(N log k)) vs heap-of-k-heads (also O(N log k)) — when does each win in practice?
- What if the lists are streaming — does the heap approach still work?
ML · Clustering
Interview questions to prep
- Walk through Lloyd's algorithm for k-means.
- Why does k-means initialization (k-means++) matter?
- How would you choose k? Elbow vs silhouette vs gap statistic.
Interview questions to prep
- When does DBSCAN beat k-means?
- What two hyperparameters does DBSCAN have and how do you pick them?
Interview questions to prep
- When is hierarchical clustering more useful than k-means?
- Compare linkage methods (single, complete, average, Ward).
References & further reading
- StatQuest — Statistics & ML playlists ↗YouTube
- scikit-learn user guide ↗scikit-learn