- Tutorials
- DSA Tutorial
- Linked Lists
Linked Lists
2 lessonsAbout 12 minutesBeginner
This part of the DSA Tutorial runs from Linked Lists Explained through to Linked List Two Pointer Problems. There are 2 lessons here, and working through them takes about 12 minutes at a steady pace.
It follows on from Stacks and Queues, 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.
- 1Linked Lists ExplainedA linked list stores each value in a node that points to the next. Learn how to build and traverse one in JavaScript, and be honest about when it beats an array — which is rarer than you think.
- 2Linked List Two Pointer ProblemsFast and slow pointers solve the classic linked list questions — find the middle, detect a cycle, find the nth node from the end — all in one pass with no extra memory.
