NoteHub

Leetcode

Master algorithms and data structures with 244 carefully curated problems

Featured

97. Interleaving String

Explore this comprehensive solution with detailed explanations and multiple approaches.

Tags:
Medium
Skills:
DP
Type:
Free
Updated Oct 12, 2025

All Articles

244 articles
Tags:
Medium
Skills:
DP
Type:
Free

97. Interleaving String

Comprehensive solution with detailed explanations and multiple approaches.

Updated Oct 12, 2025
Tags:
Medium
Skills:
Array
Type:
Free

670. Maximum Swap

Comprehensive solution with detailed explanations and multiple approaches.

Updated Oct 12, 2025
Tags:
Medium
Skills:
Array
Type:
Free

1570. Dot Product of Two Sparse Vectors

Comprehensive solution with detailed explanations and multiple approaches.

Updated Oct 12, 2025
Tags:
Medium
Skills:
Stringbacktrack
Type:
Free

93. Restore IP Addresses

Comprehensive solution with detailed explanations and multiple approaches.

Updated Sep 7, 2025

616. Add Bold Tag in String

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
StringGreedy

678. Valid Parenthesis String

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Hard
Skills:
BFS

691. Stickers to Spell Words

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Linked List

2. Add Two Numbers

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
String

3. Longest Substring Without Repeating Characters

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Sliding Window

3. Longest Substring Without Repeating Characters

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Hard
Skills:
Binary Search

4. Median of Two Sorted Arrays

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
StringDP

5. Longest Palindromic Substring

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
String

6. Zigzag Conversion

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Math

9. Palindrome Number

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Two pointer

11. Container With Most Water

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Roman

12. Integer to Roman

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Array

13. Roman to Integer

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Binary Search

14. Longest Common Prefix

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
backtrack

17. Letter Combinations of a Phone Number

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Linked List

19. Remove Nth Node From End of List

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Stack

20. Valid Parentheses

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Linked List

21. Merge Two Sorted Lists

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
backtrack

22. Generate Parentheses

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Hard
Skills:
Linked List

23. Merge k Sorted Lists

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Skills:
Linked List

24. Swap Nodes in Pairs

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Hard
Skills:
Linked List

25. Reverse Nodes in k-Group

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Array

26. Remove Duplicates from Sorted Array

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Array

27. Remove Element

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
String

28. Find the Index of the First Occurrence in a String

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Hard
Skills:
Sliding Window

30. Substring with Concatenation of All Words

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium

31. Next Permutation

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Binary Search

33. Search in Rotated Sorted Array

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Binary Search

34. Find First and Last Position of Element in Sorted Array

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Binary Search

35. Search Insert Position

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Matrix

36. Valid Sudoku

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
backtrack

39. Combination Sum

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
backtrack

40. Combination Sum II

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Hard
Skills:
Two pointer

42. Trapping Rain Wate

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
DP

45. Jump Game II

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
backtrack

46. Permutations

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Matrix

48. Rotate Image

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
String

49. Group Anagrams

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Math

50. Pow(x, n)

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Hard
Skills:
backtrack

51. N-Queens

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Hard
Skills:
backtrack

52. N-Queens II

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Kadane's algorithm

53. Maximum Subarray

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Matrix

54. Spiral Matrix

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
DP

55. Jump Game

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Interval

56. Merge Intervals

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Interval

57. Insert Interval

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
String

58. Length of Last Word

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Linked List

61. Rotate List

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
DP

62. Unique Paths

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
DP

63. Unique Paths II

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
DP

64. Minimum Path Sum

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Math

66. Plus One

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Hard

68. Text Justification

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Math

69. Sqrt(x)

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
DP

70. Climbing Stairs

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Stack

71. Simplify Path

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Matrix

73. Set Matrix Zeroes

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Binary Search

74. Search a 2D Matrix

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Hard
Skills:
String

76. Minimum Window Substring

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
backtrack

77. Combinations

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Matrixbacktrack

79. Word Search

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Array

80. Remove Duplicates from Sorted Array II

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Linked List

82. Remove Duplicates from Sorted List II

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Linked List

86. Partition List

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Array/String

88. Merge Sorted Array

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
DP

91. Decode Ways

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Linked List

92. Reverse Linked List II

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Tree

96. Unique Binary Search Trees

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Tree

98. Validate Binary Search Tree

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Tree

100. Same Tree

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Tree

101. Symmetric Tree

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Tree

102. Binary Tree Level Order Traversal

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Tree

103. Binary Tree Zigzag Level Order Traversal

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Tree

104. Maximum Depth of Binary Tree

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Tree

105. Construct Binary Tree from Preorder and Inorder Traversal

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Tree

106. Construct Binary Tree from Inorder and Postorder Traversal

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Tree

108. Convert Sorted Array to Binary Search Tree

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Tree

112. Path Sum

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
React Deep Dive

114. Flatten Binary Tree to Linked List

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
React Deep Dive

117. Populating Next Right Pointers in Each Node II

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
DP

120. Triangle

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy

121. Best Time to Buy and Sell Stock

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Array

122. Best Time to Buy and Sell Stock II

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Hard
Skills:
Tree

124. Binary Tree Maximum Path Sum

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
String

125. Valid Palindrome

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Hard
Skills:
BFS

127. Word Ladder

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium

128. Longest Consecutive Sequence

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Tree

129. Sum Root to Leaf Numbers

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Graph

130. Surrounded Regions

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Graph

133. Clone Graph

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Array

134. Gas Station

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Hard
Skills:
Array

135. Candy

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Bitwise

136. Single Number

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Bitwise

137. Single Number II

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Linked List

138. Copy List with Random Pointer

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
TrieDP

139. Word Break

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Hard
Skills:
DPTrie
Links:

140. Word Break ii - Test kĩ năng DP và Trie

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Linked List

141. Linked List Cycle

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Linked List

143. Reorder List

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Linked List

146. LRU Cache

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Divide & conquer

148. Sort List

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Hard

149. Max Points on a Line

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Stack

150. Evaluate Reverse Polish Notation

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
String

151. Reverse Words in a String

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Prefix Sum

152. Maximum Product Subarray

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Binary Search

153. Find Minimum in Rotated Sorted Array

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Stack

155. Min Stack

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Binary Search

162. Find Peak Element

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Boyer Moore

169. Majority Element

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Math

172. Factorial Trailing Zeroes

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Tree

173. Binary Search Tree Iterator

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Array

189. Rotate Array

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Bitwise

190. Reverse Bits

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Bitwise

191. Number of 1 Bits

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
DP

198. House Robber

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Tree

199. Binary Tree Right Side View

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
BFS

200. Number of Islands

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Bitwise

201. Bitwise AND of Numbers Range

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Hashmap

202. Happy Number

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Hashmap

205. Isomorphic Strings

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Linked List

206. Reverse Linked List

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
GraphTopological Sort

207. Course Schedule

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Sliding Window

209. Minimum Size Subarray Sum

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Trie

211. Design Add and Search Words Data Structure

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Hard
Skills:
Trie

212. Word Search II

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025

213. House Robber II

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Heap

215. Kth Largest Element in an Array

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy

217. Contains Duplicate

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Hashmap

219. Contains Duplicate II

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Matrix

221. Maximal Square

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Tree

222. Count Complete Tree Nodes

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Hard
Skills:
Stack

224. Basic calculator

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Tree

226. Invert Binary Tree

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Interval

228. Summary Ranges

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Tree

230. Kth Smallest Element in a BST

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Tree

235. Lowest Common Ancestor of a Binary Search Tree

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Tree

236. Lowest Common Ancestor of a Binary Tree

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Array

238. Product of Array Except Self

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Hard
Skills:
Queue
Links:

239. Sliding window maximum

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
String

242. Valid Anagram

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Overlapping arrayInterval

252. Meeting Rooms

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
min-heapIntervalOverlapping array

253. Meeting Rooms II

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
GraphTree

261. Graph valid tree

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Bitwise

268. Missing Number

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Hard
Skills:
Graph

269. Alien Dictionary

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
String

271. Encode and Decode Strings

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Array

274. H-Index

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
BFSMatrix
Links:

286. Wall and gates

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Two pointerGraph

287. Find the Duplicate Number

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Matrix

289. Game of Life

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Hashmap

290. Word Pattern

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Hard
Skills:
Heapmin-heapmax-heap

295. Find Median from Data Stream

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Hard
Skills:
Tree

297. Serialize and Deserialize Binary Tree

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
DPBinary Search

300. Longest Increasing Subsequence

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
DP

309. Best Time to Buy and Sell Stock with Cooldown

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Hard
Skills:
DFSBFS

317. Shortest Distance from All Buildings

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
DP

322. Coin Change

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Graph

323. Number of Connected Components in an Undirected Graph

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Hard

329. Longest Increasing Path in a Matrix

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
TreeDP

337. House Robber III

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Bitwise

338. Counting Bits

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Skills:
Bucket Sortmin-heap

347. Top K Frequent Elements

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Math

365. Water and Jug Problem

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Bitwise

371. Sum of Two Integers

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Heap

373. Find K Pairs with Smallest Sums

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
backtrackDP

377. Combination Sum IV

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025

378. Kth Smallest Element in a Sorted Matrix

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Skills:
Array

380. Insert Delete GetRandom O(1)

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Array

380. Insert Delete GetRandom O(1)

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Hashmap

383. Ransom Note

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium

386. Lexicographical Numbers

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Two pointer

392. Is Subsequence

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025

395. Longest Substring with At Least K Repeating Characters

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Graph

399. Evaluate Division

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025

407. Trapping Rain Water II

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Two pointer

415. Add Strings

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
DP

416. Partition Equal Subset Sum

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Matrix

417. Pacific Atlantic Water Flow

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
String

424. Longest Repeating Character Replacement

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Divide & conquer

427. Construct Quad Tree

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Graph

433. Minimum Genetic Mutation

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Interval

435. Non-overlapping Intervals

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Interval

452. Minimum Number of Arrows to Burst Balloons

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025

473. Matchsticks to Square

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Skills:
Prefix Sum

528. Random Pick with Weight

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Tree

530. Minimum Absolute Difference in BST

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Tree

543. Diameter of Binary Tree

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025

560. Subarray Sum Equals K

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Sliding Window

567. Permutation in String

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Tree

572. Subtree of Another Tree

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Tree

637. Average of Levels in Binary Tree

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
String

647. Palindromic Substrings

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Trie

648. Replace Words

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Two pointer

680. Valid Palindrome II

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Matrix

694. Number of distinct Islands

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Matrix

695. Max Area of Island

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Stack

735. Asteroid Collision

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Monotonic stack

739. Daily Temperatures

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
BFSBidirectional BFS

752. Open the Lock

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
QueueHeap

767. Reorganize String

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Hard
Skills:
Stack

772. Basic Calculator III

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Easy
Skills:
Tree

783. Minimum Distance Between BST Nodes

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
GraphBFS

785. Is Graph Bipartite?

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Hard

815. Bus Routes

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium

856. Score of Parentheses

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Graph

863. All Nodes Distance K in Binary Tree

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Binary Search

875. Koko Eating Bananas

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Graph

909. Snakes and Ladders

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Kadane's algorithm

918. Maximum Sum Circular Subarray

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
BFSDFS

934. Shortest Bridge

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
StackMonotonic stack

962. Maximum Width Ramp

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Binary Search

981. Time Based Key-Value Store

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025

1004. Max Consecutive Ones III

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Combination

1010. Pairs of Songs With Total Durations Divisible by 60

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
DP

1143. Longest Common Subsequence

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
DFSBFSTreeGraph

1245. Tree Diameter

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
TrieBinary Search

1268. Search Suggestions System

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Hard
Skills:
BFS

1293. Shortest Path in a Grid with Obstacles Elimination

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Array

1423. Maximum Points You Can Obtain from Cards

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Graph

1466. Reorder Routes to Make All Paths Lead to the City Zero

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Tree

1530. Number of Good Leaf Nodes Pairs

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Binary Search

1539. Kth Missing Positive Number

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Union-FindPrim

1584. Min Cost to Connect All Points

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Greedy

1642. Furthest Building You Can Reach

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Binary SearchGreedy

1802. Maximum Value at a Given Index in a Bounded Array

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
StringArray

1813. Sentence Similarity III

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Hard
Skills:
Heap

2402. Meeting Rooms III

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Two pointer

2422. Merge Operations to Turn Array Into a Palindrome

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Tree

2673. Make Costs of Paths Equal in a Binary Tree

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Hard
Skills:
Bit-maskDPbacktrack

2850. Minimum Moves to Spread Stones Over Grid

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Hard

2931. Maximum Spending After Buying Items

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium

3043. Find the Length of the Longest Common Prefix

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
DP

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Hard
Skills:
Monotonic stack

2334. Subarray With Elements Greater Than Varying Threshold

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Three pointer

3Sum

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Skills:
DP

Coin change - bài toán kinh điển về DP

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
Stack

Decode a string

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium

Design a Tic-Tac-Toe

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025

Remove invalid parentheses

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
Tags:
Medium
Skills:
backtrack

Subset

Comprehensive solution with detailed explanations and multiple approaches.

Updated Jun 24, 2025
NoteHub

© 2025 NoteHub. Created by PhucNT (Leon)