JavaScript
Practical Algorithms
Write functions for searching, sorting, grouping and flattening nested lists once, then reuse them in every project after that.
Start the trackFree, no sign-up needed
What you'll learn
- Removing duplicatesA one-line Set solution, then the harder case
- Counting occurrencesHow many times each value appears
- Splitting into chunksA thousand items in batches of a hundred
- Binary searchFrom a thousand comparisons down to ten
- Flattening nested listsTurn a tree into a list
- PalindromesText that reads the same both ways
- Sorting by two keysScore first, then name
- Intersection and differenceFrom n×m down to n+m
Track contents
8 lessons, 1.5 hours in total- 1Removing duplicatesJavaScriptA one-line Set solution, then the harder case11 min
- 2Counting occurrencesJavaScriptHow many times each value appears12 min
- 3Splitting into chunksJavaScriptA thousand items in batches of a hundred11 min
- 4Binary searchJavaScriptFrom a thousand comparisons down to ten14 min
- 5Flattening nested listsJavaScriptTurn a tree into a list13 min
- 6PalindromesJavaScriptText that reads the same both ways12 min
- 7Sorting by two keysJavaScriptScore first, then name12 min
- 8Intersection and differenceJavaScriptFrom n×m down to n+m12 min
More Web tracks
All tracks- </>Beginner
Web Basics
Start with your very first HTML tag and finish with a complete interactive app.
8 lessons1.5 hours - { }Intermediate
CSS in Depth
Go deeper into the box model, custom properties, positioning, container queries and more, so you understand what's really going on behind the styles you see.
8 lessons1.5 hours - { }Beginner
Text and Typography
Learn to scale headings, choose the right units, and set line length and text direction, because text is what people read most in any interface.
8 lessons1.5 hours