- Tutorials
- DSA Tutorial
- Arrays
Arrays
2 lessonsAbout 12 minutesBeginner
This part of the DSA Tutorial runs from Arrays in JavaScript for DSA through to Array Traversal Patterns. There are 2 lessons here, and working through them takes about 12 minutes at a steady pace.
It follows on from Big O and Complexity, so finish that first if you have not already — the examples below assume you are comfortable with it.
Each lesson below says what it covers before you open it. Read them in order the first time; afterwards this page works as a index you can jump back into when you need to check one thing.
- 1Arrays in JavaScript for DSAWhat a JavaScript array really is, why push is fast and shift is slow, and the true cost of every array operation you will use in algorithm problems.
- 2Array Traversal PatternsThe four ways to walk an array in algorithm problems — running state, both ends, read and write pointers, and remembering what you have seen — with JavaScript examples.
