Live100% off100% discount ends in 10 hours.

Free content

DSA Sheet

211 curated LeetCode problems organized by topic. Track your progress and watch video walkthroughs where available.

Featured video

LeetCode 75: Sort Colors | Dutch National Flag Algorithm Explained in Python

Overall progress

0%

0 of 211 completed

01 Arrays0 / 30
1-D Array0 / 9

01Richest customer wealth

02Two Sum

03Count negative numbers in a sorted matrix

04Next permutation

05Median of two sorted arrays

06Find greatest common divisor of array

07Self dividing numbers

08Inversion of array - 1587115620

09Reverse pairs

2-D Array0 / 5

10Special positions in a binary matrix

11Transpose Matrix

1201 Matrix

13Spiral Matrix

14Pascal's Triangle

Prefix Sum0 / 3

15Minimum Size Subarray Sum

16Running Sum of 1d Array

17Range Sum Query 2D Immutable

PracticeComing soon
Kadane's Algorithm0 / 3

18Maximum Subarray

19Maximum Sum Circular Subarray

20Longest Turbulent Subarray

Sliding Window (Fixed/Variable Size)0 / 5

21Contains Duplicate II

22Number of Sub-arrays of Size K and Average ..

23Minimum Size Subarray Sum

24Longest Substring Without Repeating Characters

25Longest Repeating Character Replacement

Two Pointers0 / 5

26Container With Most Water

27Trapping Rain Water

28Two Sum II - Input Array Is Sorted

29K-diff Pairs in an Array

30Find K Closest Elements

02 Binary Search0 / 7

31Search in Rotated Sorted Array

32Remove Duplicates from Sorted Array

33Find First and Last Position of Element in Sorted Array

34Search a 2D Matrix

35Find Peak Element

36Single Element in a Sorted Array

PracticeComing soon

37Preimage Size of Factorial Zeroes Function

03 Sorting0 / 7

38Check if Two Arrays Are Equal or Not

39Binary Array Sorting

40Sort Colors

41Kth Largest Element in an Array

42Minimum Absolute Difference

43K Closest Points to Origin

44Max Chunks To Make Sorted

04 Hashing0 / 9

45Contiguous Array

46Longest Consecutive Sequence

47Subarray Sum Equals K

48Valid Anagram

49Valid Sudoku

50Ugly Number II

PracticeComing soon

51Subarray Sum Equals K

52Max Points on a Line

PracticeComing soon

53Palindrome Pairs

PracticeComing soon
05 Linked Lists0 / 15

54Middle of the Linked List

PracticeComing soon

55Maximum Twin Sum of a Linked List

PracticeComing soon

56Merge Two Sorted Lists

PracticeComing soon

57Linked List Cycle

PracticeComing soon

58Reverse Nodes in k-Group

PracticeComing soon

59Remove Nth Node From End of List

PracticeComing soon

60Linked List Cycle II

PracticeComing soon

61Delete Node in a Linked List

PracticeComing soon

62Reverse Linked List

PracticeComing soon

63Palindrome Linked List

PracticeComing soon

64Remove Linked List Elements

PracticeComing soon

65Convert Binary Number in a Linked List to Integer

PracticeComing soon

66Remove Duplicates from Sorted List II

PracticeComing soon

67Reverse Linked List II

PracticeComing soon

68Sort List

PracticeComing soon
06 Stack and Queue0 / 10

69Implement Stack using Queues

PracticeComing soon

70Implement Queue using Stacks

PracticeComing soon

71Backspace String Compare

PracticeComing soon

72Baseball Game

PracticeComing soon

73Longest Valid Parentheses

PracticeComing soon

74Evaluate Reverse Polish Notation

PracticeComing soon

75Daily Temperatures

PracticeComing soon

76Largest Rectangle in Histogram

PracticeComing soon

77Min Stack

PracticeComing soon

78Minimum Remove to Make Valid Parentheses

PracticeComing soon
07 Heap0 / 6

79Find Median from Data Stream

PracticeComing soon

80Merge k Sorted Lists

PracticeComing soon

81Find K Pairs with Smallest Sums

PracticeComing soon

82Meeting Rooms II

PracticeComing soon

83Top K Frequent Elements

PracticeComing soon

84K Closest Points to Origin

08 Recursion & Backtracking0 / 14
Recursion0 / 6

85Count Good Numbers

PracticeComing soon

86Permutations

PracticeComing soon

87Permutations II

PracticeComing soon

88Subsets

PracticeComing soon

89Basic Calculator

PracticeComing soon

90Wildcard Matching

PracticeComing soon
Backtracking0 / 8

91Combinations

PracticeComing soon

92Combination Sum

PracticeComing soon

93Combination Sum III

PracticeComing soon

94Letter Combinations of a Phone Number

PracticeComing soon

95Gray Code

PracticeComing soon

96Letter Case Permutation

PracticeComing soon

97N-Queens

PracticeComing soon

98Sudoku Solver

PracticeComing soon
09 Trees0 / 17
Binary Tree0 / 4

99Construct Binary Tree from Inorder and Postorder Traversal

PracticeComing soon

100Construct Binary Tree from Preorder and Inorder Traversal

PracticeComing soon

101Path Sum

PracticeComing soon

102Same Tree

PracticeComing soon
Level Order Traversal (BFS)0 / 1

103Binary Tree Level Order Traversal

PracticeComing soon
DFS (Recursive & Iterative)0 / 8

104Invert Binary Tree

PracticeComing soon

105Minimum Cost Tree From Leaf Values

PracticeComing soon

106Binary Tree Zigzag Level Order Traversal

PracticeComing soon

107Maximum Depth of Binary Tree

PracticeComing soon

108Sum of Left Leaves

PracticeComing soon

109Binary Tree Right Side View

PracticeComing soon

110Path Sum II

PracticeComing soon

111Path Sum III

PracticeComing soon
BST0 / 4

112Lowest Common Ancestor of a Binary Search Tree

PracticeComing soon

113Closest Binary Search Tree Value II

PracticeComing soon

114Trim a Binary Search Tree

PracticeComing soon

115Search in a Binary Search Tree

PracticeComing soon
10 Trees II0 / 11
BBST (AVL Tree)0 / 4

116Queue Reconstruction by Height

PracticeComing soon

117Binary Tree Pruning

PracticeComing soon

118Balance a Binary Search Tree

PracticeComing soon

119Balanced Binary Tree

PracticeComing soon
Trie0 / 3

120Implement Trie (Prefix Tree)

PracticeComing soon

121Design Add and Search Words Data Structure

PracticeComing soon

122Word Search II

PracticeComing soon
Union-Find (Disjoint Set)0 / 2

123Redundant Connection

PracticeComing soon

124Accounts Merge

PracticeComing soon
Segment Tree (Range Queries)0 / 2

125Range Sum Query Mutable

PracticeComing soon

126Longest Increasing Subsequence II

PracticeComing soon
11 Graphs0 / 20
BFS & DFS0 / 4

127Rotting Oranges

PracticeComing soon

128Word Ladder

PracticeComing soon

129Number of Provinces

PracticeComing soon

130Number of Enclaves

PracticeComing soon
Detect Cycle in Undirected/Directed Graph0 / 6

131Detect Cycle in an Undirected Graph

PracticeComing soon

132Detect Cycle in a Directed Graph

PracticeComing soon

133Course Schedule

PracticeComing soon

134Course Schedule II

PracticeComing soon

135Find Eventual Safe States

PracticeComing soon

136Alien Dictionary

PracticeComing soon
Dijkstra's Algorithm (SSSP)0 / 4

137Network Delay Time

PracticeComing soon

138Shortest Path in Binary Matrix

PracticeComing soon

139Path With Minimum Effort

PracticeComing soon

140Cheapest Flights Within K Stops

PracticeComing soon
Prim's & Kruskal's (MST)0 / 3

141Min Cost to Connect All Points

PracticeComing soon

142Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree

PracticeComing soon

143Connecting Cities With Minimum Cost

PracticeComing soon
Floyd-Warshall (APSP)0 / 3

144Course Schedule IV

PracticeComing soon

145Find the City With the Smallest Number of Neighbors at a...

PracticeComing soon

146Number of Ways to Arrive at Destination

PracticeComing soon
12 Greedy0 / 8

147Non-overlapping Intervals

PracticeComing soon

148Minimum Platforms

PracticeComing soon

149Maximize Sum Of Array After K Negations

PracticeComing soon

150Assign Mice to Holes

PracticeComing soon

151Maximum Product of Three Numbers

PracticeComing soon

152Bulb Switcher

PracticeComing soon

153Candy

PracticeComing soon

154Maximum Swap

PracticeComing soon
13 Dynamic Programming0 / 31
Climbing Stairs0 / 3

155Climbing Stairs

PracticeComing soon

156Decode Ways

PracticeComing soon

157Frog Jump

PracticeComing soon
Coin Change (1D DP)0 / 2

158Coin Change

PracticeComing soon

159Minimum Jumps to Reach Home

PracticeComing soon
Buy and Sell Stock0 / 6

160Best Time to Buy and Sell Stock

PracticeComing soon

161Best Time to Buy and Sell Stock II

PracticeComing soon

162Best Time to Buy and Sell Stock III

PracticeComing soon

163Best Time to Buy and Sell Stock IV

PracticeComing soon

164Best Time to Buy and Sell Stock with Cooldown

PracticeComing soon

165Best Time to Buy and Sell Stock with Transaction Fee

PracticeComing soon
0/1 Knapsack0 / 2

166Partition Equal Subset Sum

PracticeComing soon

167Ones and Zeroes

PracticeComing soon
Unbounded Knapsack0 / 2

168Coin Change II

PracticeComing soon

169Last Stone Weight II

PracticeComing soon
Longest Common Subsequence (LCS)0 / 4

170Longest Common Subsequence

PracticeComing soon

171Edit Distance

PracticeComing soon

172Longest Palindromic Subsequence

PracticeComing soon

173Minimum Insertion Steps to Make a String Palindrome

PracticeComing soon
Longest Increasing Subsequence (LIS)0 / 3

174Longest Increasing Subsequence

PracticeComing soon

175Largest Divisible Subset

PracticeComing soon

176Longest String Chain

PracticeComing soon
Matrix Chain Multiplication (MCM)0 / 4

177Minimum Cost to Cut a Stick

PracticeComing soon

178Burst Balloons

PracticeComing soon

179Parsing a Boolean Expression

PracticeComing soon

180Palindrome Partitioning II

PracticeComing soon
DP on Grids and Trees0 / 5

181Shortest Path Visiting All Nodes

PracticeComing soon

182Unique Paths

PracticeComing soon

183Unique Paths II

PracticeComing soon

184Minimum Path Sum

PracticeComing soon

185Russian Doll Envelopes

PracticeComing soon
14 Math0 / 16

186Find Greatest Common Divisor of Array

187Self Dividing Numbers

188Number of Good Pairs

PracticeComing soon

189Four Divisors

PracticeComing soon

190Day of the Week

PracticeComing soon

191Subtract the Product and Sum of Digits of an Integer

PracticeComing soon

192Count of Matches in Tournament

PracticeComing soon

193Max Consecutive Ones

PracticeComing soon

194Rectangle Overlap

PracticeComing soon

195Excel Sheet Column

PracticeComing soon

196Unique Paths

PracticeComing soon

197Rectangle Area

PracticeComing soon

198Check If Array Pairs Are Divisible by k

PracticeComing soon

199Factorial Trailing Zeroes

PracticeComing soon

200Nth Magical Number

PracticeComing soon

201Permutation Sequence

PracticeComing soon
15 Miscellaneous0 / 10
Bit Manipulation Tricks0 / 7

202Single Number

PracticeComing soon

203Reverse Bits

PracticeComing soon

204Single Number II

PracticeComing soon

205Number of 1 Bits

PracticeComing soon

206Factorial Trailing Zeroes

PracticeComing soon

207Binary Number with Alternating Bits

PracticeComing soon

208Number of Even and Odd Bits

PracticeComing soon
Rabin-Karp (Rolling Hash)0 / 3

209Find the Index of the First Occurrence in a String

PracticeComing soon

210Repeated DNA Sequences

PracticeComing soon

211Longest Duplicate Substring

PracticeComing soon