JavaScript
🧠 Algorithms and complexity
Measure efficiency with Big-O and master searching, sorting, and recursion.
What you'll learn
- Estimate the time complexity of an algorithm in Big-O notation (
O(1),O(n),O(log n),O(n²),O(n log n)) by counting its loops. - Implement linear search and binary search and justify when to apply each one.
- Code
mergeSortwith the divide-and-conquer strategy without mutating the original array. - Optimize expensive recursive functions by memoizing results with a
Mapinside a closure.
Lessons
Big-O notationHow to measure the cost of an algorithm. Linear and binary searchFinding an element efficiently. Sorting and recursionBubble sort, merge/quick, and recursive algorithms. Merge sort in detailImplementing divide and conquer with merge sort. MemoizationCaching results with a closure and a Map.Practice this module in the app
DevPath is a hands-on course: you read the theory here; in the app you put it into practice with exercises that really run, offline.
Start free in the app →