Search
Lessons (6)
- Sorting Algorithms
From simple bubble sort to merge sort and quick sort. See how each one works, compare their speeds …
- DSA Interview Patterns Cheat Sheet
… intervals (merge overlapping meetings) js function mergeIntervals(intervals) { const sorted = intervals.toSorted((a, b) = a[0] - b[0 …
- Heaps & Priority Queues
… merge K sorted lists Put the first element of each list in a heap; repeatedly pop the smallest …
- Two Pointers & Sliding Window
… cycle Two arrays One pointer per array Merge two sorted arrays, intersection Example: remove duplicates in place (fast …
- Big-O Notation Made Simple
… log n) Linearithmic ~10,000 Good sorting (merge sort, Array.sort ) O(n²) Quadratic 1,000,000 Nested …
- Linked Lists
… js // Merge two sorted lists: 1→3→5 + 2→4 → 1→2→3→4→5 function mergeSorted(a …