Linked List LeetCode Problems: All 75,
With Python Solutions

Every problem in this library that LeetCode tags Linked List. 63 of them carry a complete Python solution, a worked example and the time and space complexity of the approach.

Easy
12
Medium
56
Hard
7
1 pattern

How Linked List problems are solved

A tag names the subject, not the method. These pattern hubs cover the techniques that actually solve Linked List problems — each one explains the approach, gives a Python template and states its complexity.

Eyes only

When the Linked List problem arrives live.

In the live round, Stealth Interview reads the problem off your screen, returns a working solution with a step-by-step explanation and its time and space complexity, and transcribes what the interviewer says. It's a desktop app for macOS and Windows, invisible to screen sharing.

Linked List problems by difficulty

Problems with a complete Python solution are listed first, then by ascending problem number.

Easy (12)

Easy problems
No.Problem
0021Merge Two Sorted Lists
0083Remove Duplicates from Sorted List
0141Linked List Cycle
0160Intersection of Two Linked Lists
0203Remove Linked List Elements
0206Reverse Linked List
0234Palindrome Linked List
0705Design HashSet
0706Design HashMap
0876Middle of the Linked List
1290Convert Binary Number in a Linked List to Integer
1474Delete N Nodes After M Nodes of a Linked ListPremium

Medium (56)

Medium problems
No.Problem
0002Add Two Numbers
0019Remove Nth Node From End of List
0024Swap Nodes in Pairs
0061Rotate List
0082Remove Duplicates from Sorted List II
0086Partition List
0092Reverse Linked List II
0109Convert Sorted List to Binary Search Tree
0114Flatten Binary Tree to Linked List
0116Populating Next Right Pointers in Each Node
0117Populating Next Right Pointers in Each Node II
0138Copy List with Random Pointer
0142Linked List Cycle II
0143Reorder List
0146LRU Cache
0147Insertion Sort List
0148Sort List
0237Delete Node in a Linked List
0328Odd Even Linked List
0355Design Twitter
0382Linked List Random Node
0430Flatten a Multilevel Doubly Linked List
0445Add Two Numbers II
0622Design Circular Queue
0641Design Circular Deque
0707Design Linked List
0725Split Linked List in Parts
0817Linked List Components
1019Next Greater Node In Linked List
1171Remove Zero Sum Consecutive Nodes from Linked List
1367Linked List in Binary Tree
1472Design Browser History
1669Merge In Between Linked Lists
1670Design Front Middle Back Queue
1721Swapping Nodes in a Linked List
1797Design Authentication Manager
2058Find the Minimum and Maximum Number of Nodes Between Critical Points
2074Reverse Nodes in Even Length Groups
2095Delete the Middle Node of a Linked List
2130Maximum Twin Sum of a Linked List
2181Merge Nodes in Between Zeros
2289Steps to Make Array Non-decreasing
2326Spiral Matrix IV
2487Remove Nodes From Linked List
2807Insert Greatest Common Divisors in Linked List
2816Double a Number Represented as a Linked List
0369Plus One Linked ListPremium
0379Design Phone DirectoryPremium
0426Convert Binary Search Tree to Sorted Doubly Linked ListPremium
0708Insert into a Sorted Circular Linked ListPremium
1265Print Immutable Linked List in ReversePremium
1634Add Two Polynomials Represented as Linked ListsPremium
1756Design Most Recently Used QueuePremium
1836Remove Duplicates From an Unsorted Linked ListPremium
2046Sort Linked List Already Sorted Using Absolute ValuesPremium
2674Split a Circular Linked ListPremium

Hard (7)

Hard problems
No.Problem
0023Merge k Sorted Lists
0025Reverse Nodes in k-Group
0432All O`one Data Structure
0460LFU Cache
1206Design Skiplist
2296Design a Text Editor
0716Max StackPremium