BeginnerAbout 15 min
Linked List
Read the full article on Substack
6 min read.
A linear data structure where elements are not stored at contiguous memory locations. The elements are linked using pointers.
Think of it this way: Think of a treasure hunt where each clue tells you exactly where to find the next clue. You can't skip ahead; you must follow the chain. Unlike a bookshelf (Array) where you can grab the 5th book instantly.
head → null
Empty list: head is null.
1/15
Check your understanding
Answer from memory before you scroll back up. Pulling an idea out of your head is what makes it stay there.
Reverse a singly linked list
Sequence
Order one iteration of the three-pointer reversal, from set-up to finish.
Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.
- 1Drop a step here
- 2Drop a step here
- 3Drop a step here
- 4Drop a step here
- 5Drop a step here
5 pieces left to place
Quiz
20 questionsQuestion 1 of 20
Score: 0
What is the time complexity to access the Nth element?
Done with this lesson?
Sign in free to keep your progress, streak and quiz scores.