Workspace

Linked Lists

3 day streakD
All algorithms

Linked list algorithms.

Learn the idea, follow the pointers, then put it into code.

18 lessons · Python & C++

Basics

Fast & slow pointers

Reversal

Merging & sorting

ProblemDifficultyTime complexityPractice
Merge Two Sorted ListsEasyO(n + m)LeetCode
Merge k Sorted ListsHardO(N log(k + 1) + k)LeetCode
Merge Sort on a Linked ListMediumO(n log n)LeetCode

Construction

ProblemDifficultyTime complexityPractice
Add Two NumbersMediumO(max(n, m))LeetCode
Copy a List with Random PointersMediumO(n) expectedLeetCode

A good place to start

Explore a pattern

A little guidance

Start with a pattern, read through a problem, and mark it solved when the idea clicks. Save anything you want to revisit.

New tutorials are added one at a time. Your bookmarks and solved checkmarks stay in this browser.

Explore the roadmap