<DS/>DS_VISUALIZER
FoundationsOOPArraysLinked ListStacksQueuesTreesGraphsHashingStrings
exploreExplore
homechevron_rightTopicschevron_rightLinked Listchevron_rightClassic Problems
code

LINKED LIST · CLASSIC PROBLEMS

Classic Problems

Must-know LeetCode list problems — pointer surgery and the tortoise & hare.

Choose a problem

swap_horizarrow_outward

Reverse a List

Flip every next pointer (#206).

O(n)O(1)◍ 0/7
align_horizontal_centerarrow_outward

Middle of the List

Tortoise & hare midpoint (#876).

O(n)O(1)◍ 0/6
last_pagearrow_outward

Remove Nth From End

Two pointers with a gap of n (#19).

O(n)O(1)◍ 0/6
compare_arrowsarrow_outward

Palindrome List

Compare the list with its reverse (#234).

O(n)O(1)◍ 0/6