LeetCode Solutions
Tổng Hợp Lời Giải

Tổng hợp 462+ lời giải LeetCode với code sạch và tối ưu. Viết bằng C++, Python, SQL & nhiều ngôn ngữ khác.

🔥 494 file code 📝 Code gọn gàng 🌐 6 ngôn ngữ
🏆
0
Tổng số bài
🟢
0
Easy
🟡
0
Medium
🔴
0
Hard
Độ khó
Ngôn ngữ
Hiển thị 462 / 462 bài
#0001
Easy C++

1. Two Sum

Hash TableUnion Find
#0002
Medium C++

2. Add Two Numbers

Linked List
#0003
Medium Python

3. Longest Substring Without Repeating Characters

String
#0005
Medium C++

5. Longest Palindromic Substring

Binary SearchString
#0006
Medium C++ +1

6. Zigzag Conversion

String
#0007
Medium Python

7. Reverse Integer

#0010
Hard C++

10. Regular Expression Matching

Dynamic ProgrammingMatrixString
#0011
Medium Python

11. Container With Most Water

#0012
Medium Python

12. Integer to Roman

#0014
Easy N/A

14. Longest Common Prefix

#0015
Medium Python

15. 3Sum

Sorting
#0017
Medium C++ +1

17. Letter Combinations of a Phone Number

DFSBacktrackingString
#0018
Medium C++

18. 4Sum

Two PointersBit Manipulation
#0019
Medium C++

19. Remove Nth Node From End of List

Linked List
#0020
Easy C++ +1

20. Valid Parentheses

Hash TableStackUnion Find
#0021
Easy Python

21. Merge Two Sorted Lists

Linked List
#0023
Hard C++ +1

23. Merge k Sorted Lists

Linked List
#0024
Medium C++

24. Swap Nodes in Pairs

Linked List
#0025
Hard Python

25. Reverse Nodes in k-Group

Linked List
#0026
Easy C++

26. Remove Duplicates from Sorted Array

#0027
Easy C++

27. Remove Element

#0028
Medium Python

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

#0029
Medium C++

29. Divide Two Integers

#0030
Hard C++

30. Substring with Concatenation of All Words

Hash TableBit ManipulationString
#0031
Medium C++

31. Next Permutation

#0033
Medium Python

33. Search in Rotated Sorted Array

Binary Search
#0034
Medium Python

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

Binary Search
#0035
Easy Python

35. Search Insert Position

Bit Manipulation
#0036
Medium Python

36. Valid Sudoku

Matrix
#0038
Medium C++ +1

38. Count and Say

String
#0040
Medium Python

40. Combination Sum II

DFSSorting
#0041
Hard Python

41. First Missing Positive

Sorting
#0042
Hard C++

42. Trapping Rain Water

#0043
Medium Python

43. Multiply Strings

#0044
Hard C++

44. Wildcard Matching

Dynamic ProgrammingBit ManipulationMatrix
#0045
Medium Python

45. Jump Game II

Dynamic Programming
#0046
Medium C++

46. Permutations

DFSBit Manipulation
#0047
Medium C++

47. Permutations II

DFSHash TableBit Manipulation
#0048
Medium Python

48. Rotate Image

Matrix
#0049
Medium Python

49. Group Anagrams

Hash TableSorting
#0050
Medium Python

50. Pow(x, n)

#0051
Hard C++

51. N-Queens

Bit ManipulationBacktrackingMatrix
#0052
Hard C++

52. N-Queens II

Bit ManipulationBacktrackingMatrix
#0053
Medium C++

53. Maximum Subarray

#0054
Medium C++

54. Spiral Matrix

Bit ManipulationMatrix
#0055
Medium C++

55. Jump Game

Dynamic Programming
#0056
Medium Python

56. Merge Intervals

Sorting
#0057
Medium Python

57. Insert Interval

Binary Search
#0059
Medium C++

59. Spiral Matrix II

Bit ManipulationMatrix
#0062
Medium Python

62. Unique Paths

Dynamic ProgrammingMatrix
#0063
Medium C++

63. Unique Paths II

Dynamic ProgrammingBit ManipulationMatrix
#0064
Medium Python

64. Minimum Path Sum

Matrix
#0067
Easy C++

67. Add Binary

String
#0068
Hard C++

68. Text Justification

Two PointersString
#0070
Easy Python

70. Climbing Stairs

Dynamic Programming
#0071
Medium Python

Simplify Path

Stack
#0072
Hard C++

72. Edit Distance

Dynamic ProgrammingMatrixString
#0073
Medium Python

73. Set Matrix Zeroes

Matrix
#0074
Medium C++

74. Search a 2D Matrix

Binary SearchBit ManipulationMatrix
#0075
Medium C++

75. Sort Colors

#0076
Medium Python

Minimum Window Substring

Hash Table
#0077
Medium N/A

77. Combinations

#0078
Medium Python

78. Subsets

Bit Manipulation
#0079
Medium C++

79. Word Search

DFSBit ManipulationString
#0081
Medium Python

81. Search in Rotated Sorted Array II

#0082
Medium C++

82. Remove Duplicates from Sorted List II

Linked List
#0083
Easy Python

83. Remove Duplicates from Sorted List

Linked List
#0084
Hard C++ +1

84. Largest Rectangle in Histogram

Binary SearchStack
#0085
Hard Python

85. Maximal Rectangle

StackMatrix
#0086
Medium C++

86. Partition List

Linked List
#0087
Hard C++ +1

87. Scramble String

Dynamic ProgrammingHash TableString
#0088
Easy C++

88. Merge Sorted Array

#0089
Medium Python

89. Gray Code

Bit Manipulation
#0090
Medium Python

90. Subsets II

SortingBit Manipulation
#0092
Medium C++

92. Reverse Linked List II

Linked List
#0093
Medium Python

93. Restore IP Addresses

Backtracking
#0094
Easy Python

94. Binary Tree Inorder Traversal

Tree Traversal
#0095
Medium C++

95. Unique Binary Search Trees II

DFSTree Traversal
#0097
Medium C++

97. Interleaving String

Dynamic ProgrammingMatrixString
#0098
Medium C++

98. Validate Binary Search Tree

Tree Traversal
#0100
Easy C++ +1

100. Same Tree

Tree Traversal
#0101
Easy C++

101. Symmetric Tree

DFSTree Traversal
#0102
Medium Python

102. Binary Tree Level Order Traversal

Tree Traversal
#0103
Medium Python

103. Binary Tree Zigzag Level Order Traversal

Tree Traversal
#0104
Easy Python

104. Maximum Depth of Binary Tree

Tree Traversal
#0105
Medium Python

105. Construct Binary Tree from Preorder and Inorder Traversal

DFSTree Traversal
#0106
Medium C++

106. Construct Binary Tree from Inorder and Postorder Traversal

Tree Traversal
#0107
Medium Python

107. Binary Tree Level Order Traversal II

Tree Traversal
#0108
Easy Python

108. Convert Sorted Array to Binary Search Tree

Binary SearchTree Traversal
#0109
Medium C++

109. Convert Sorted List to Binary Search Tree

DFSBinary SearchTree Traversal
#0111
Easy C++

111. Minimum Depth of Binary Tree

Tree Traversal
#0114
Medium N/A

114. Flatten Binary Tree to Linked List

#0115
Hard C++

115. Distinct Subsequences

Dynamic ProgrammingBit ManipulationMatrix
#0118
Easy C++ +1

118. Pascal's Triangle

Bit Manipulation
#0119
Easy Python

119. Pascal's Triangle II

#0121
Easy C++

121. Best Time to Buy and Sell Stock

#0122
Medium C++

122. Best Time to Buy and Sell Stock II

#0123
Hard C++

123. Best Time to Buy and Sell Stock III

Dynamic Programming
#0124
Hard Python

124. Binary Tree Maximum Path Sum

DFSTree Traversal
#0125
Easy C++

125. Valid Palindrome

String
#0127
Hard C++

127. Word Ladder

Hash TableUnion FindString
#0128
Medium C++ +1

128. Longest Consecutive Sequence

Hash TableUnion Find
#0129
Medium C++

129. Sum Root to Leaf Numbers

DFSTree TraversalString
#0131
Medium Python

131. Palindrome Partitioning

Backtracking
#0133
Medium C++

133. Clone Graph

Hash Table
#0134
Medium Python

Gas Station

#0135
Hard C++

135. Candy

#0136
Easy Python

136. Single Number

#0137
Medium C++ +1

137. Single Number II

Bit Manipulation
#0138
Medium Python

138. Copy List with Random Pointer

Hash TableLinked List
#0139
Medium Python

139. Word Break

Dynamic Programming
#0140
Hard Python

140. Word Break II

DFSHash TableUnion Find
#0141
Easy C++

141. Linked List Cycle

Linked List
#0142
Medium C#

142. Linked List Cycle II

Linked List
#0144
Easy Python

144. Binary Tree Preorder Traversal

Tree Traversal
#0145
Easy Python

145. Binary Tree Postorder Traversal

Tree Traversal
#0146
Medium Python

146. LRU Cache

#0148
Medium Python

148. Sort List

Linked ListSorting
#0149
Hard Python

149. Max Points on a Line

Hash Table
#0150
Medium Python

150. Evaluate Reverse Polish Notation

Stack
#0151
Medium Python

151. Reverse Words in a String

#0152
Medium C++

152. Maximum Product Subarray

Dynamic Programming
#0153
Medium C++

153. Find Minimum in Rotated Sorted Array

#0155
Medium Python

155. Min Stack

Stack
#0160
Easy Python

160. Intersection of Two Linked Lists

Linked List
#0162
Medium Python

162. Find Peak Element

#0164
Hard Python

164. Maximum Gap

#0168
Easy C++

168. Excel Sheet Column Title

String
#0169
Easy C++ +1

169. Majority Element

Sorting
#0174
Hard C++

174. Dungeon Game

Dynamic ProgrammingBit ManipulationMatrix
#0176
Medium SQL

176. Second Highest Salary

#0178
Medium N/A

178. Rank Scores

#0180
Medium SQL

180. Consecutive Numbers

#0183
Easy SQL

183. Customers Who Never Order

#0184
Medium SQL

184. Department Highest Salary

#0187
Medium C++

187. Repeated DNA Sequences

Hash TableString
#0188
Hard C++

188. Best Time to Buy and Sell Stock IV

Dynamic Programming
#0196
Easy SQL

196. Delete Duplicate Emails

#0198
Medium Python

198. House Robber

#0199
Medium Python

199. Binary Tree Right Side View

DFSTree Traversal
#0200
Medium C++

200. Number of Islands

DFSBit ManipulationMatrix
#0201
Medium Python

201. Bitwise AND of Numbers Range

Bit Manipulation
#0202
Easy C++

202. Happy Number

#0203
Easy Python

203. Remove Linked List Elements

Linked List
#0204
Medium C++

204. Count Primes

Dynamic Programming
#0205
Easy Python

205. Isomorphic Strings

#0206
Easy Python

206. Reverse Linked List

Linked List
#0207
Medium Python

207. Course Schedule

DFSHash TableGraph
#0208
Medium C++ +1

208. Implement Trie (Prefix Tree)

Hash TableTriePrefix Sum
#0209
Medium Python

209. Minimum Size Subarray Sum

Binary Search
#0210
Medium C++ +1

210. Course Schedule II

DFSHash TableGraph
#0211
Medium Python

211. Design Add and Search Words Data Structure

DFSHash TableTrie
#0212
Hard C++

212. Word Search II

DFSBit ManipulationTrie
#0213
Medium C++

213. House Robber II

Dynamic Programming
#0214
Hard C++ +1

214. Shortest Palindrome

String
#0215
Medium Python

215. Kth Largest Element in an Array

Sorting
#0216
Medium C++

216. Combination Sum III

DFSBit Manipulation
#0217
Easy C++

217. Contains Duplicate

Hash TableUnion Find
#0218
Hard C++

218. The Skyline Problem

Bit Manipulation
#0219
Easy Python

219. Contains Duplicate II

#0221
Medium C++

221. Maximal Square

Dynamic ProgrammingBit ManipulationMatrix
#0222
Medium C++ +1

222. Count Complete Tree Nodes

Tree Traversal
#0223
Medium C++

223. Rectangle Area

#0224
Hard C++

224. Basic Calculator

StackString
#0225
Easy C++

225. Implement Stack using Queues

Stack
#0226
Easy Python

226. Invert Binary Tree

Tree Traversal
#0228
Easy Python

228. Summary Ranges

#0229
Medium C++

229. Majority Element II

#0230
Medium C++

230. Kth Smallest Element in a BST

Tree Traversal
#0232
Easy Python

232. Implement Queue using Stacks

#0233
Hard C++ +1

233. Number of Digit One

Dynamic ProgrammingString
#0234
Easy Python

234. Palindrome Linked List

Linked ListString
#0235
Medium C++

235. Lowest Common Ancestor of a Binary Search Tree

Tree Traversal
#0236
Medium Python

236. Lowest Common Ancestor of a Binary Tree

Tree Traversal
#0237
Medium Python

237. Delete Node in a Linked List

Linked List
#0238
Medium Python

Product Of Array Except Self

#0239
Hard C++ +1

239. Sliding Window Maximum

Dynamic ProgrammingSliding WindowBit Manipulation
#0240
Medium Python

240. Search a 2D Matrix II

Matrix
#0242
Easy C++

242. Valid Anagram

String
#0258
Easy Python

258. Add Digits

#0260
Medium Python

260. Single Number III

Bit Manipulation
#0263
Easy Python +1

263. Ugly Number

#0264
Medium C++

264. Ugly Number II

Hash Table
#0274
Medium Python

274. H-Index

Sorting
#0275
Medium Python

275. H-Index II

#0278
Easy Python

278. First Bad Version

#0279
Medium C++

279. Perfect Squares

Dynamic Programming
#0287
Medium Python

287. Find the Duplicate Number

Sorting
#0290
Easy Python

290. Word Pattern

Hash Table
#0295
Hard C++

295. Find Median from Data Stream

Bit ManipulationHeap / Priority Queue
#0299
Medium C++ +2

299. Bulls and Cows

Hash TableString
#0300
Medium Python

300. Longest Increasing Subsequence

Dynamic Programming
#0303
Easy Python

303. Range Sum Query - Immutable

Prefix Sum
#0304
Medium C++

304. Range Sum Query 2D - Immutable

Dynamic ProgrammingBit ManipulationMatrix
#0307
Medium Python

307. Range Sum Query - Mutable

Binary SearchBit Manipulation
#0309
Medium Python

309. Best Time to Buy and Sell Stock with Cooldown

Dynamic ProgrammingDFS
#0310
Medium C++

310. Minimum Height Trees

GraphBit Manipulation
#0312
Hard Python

312. Burst Balloons

Dynamic Programming
#0315
Hard Python

315. Count of Smaller Numbers After Self

Binary SearchBit Manipulation
#0318
Medium N/A

318. Maximum Product of Word Lengths

#0319
Medium Python

319. Bulb Switcher

#0322
Medium C++

322. Coin Change

Dynamic Programming
#0328
Medium Python

328. Odd Even Linked List

Linked List
#0329
Hard Python

329. Longest Increasing Path in a Matrix

Dynamic ProgrammingDFSMatrix
#0332
Hard C++

332. Reconstruct Itinerary

DFSHash TableGraph
#0338
Easy C++

338. Counting Bits

#0342
Easy Python

342. Power of Four

#0343
Medium C++

343. Integer Break

Dynamic Programming
#0345
Easy Python

345. Reverse Vowels of a String

#0347
Medium Python

347. Top K Frequent Elements

Hash TableSorting
#0350
Easy C++ +1

350. Intersection of Two Arrays II

Hash Table
#0352
Medium Python

Data Stream As Disjoint Intervals

Heap / Priority Queue
#0354
Hard C++

354. Russian Doll Envelopes

Bit Manipulation
#0357
Medium Python

357. Count Numbers with Unique Digits

Dynamic ProgrammingBit Manipulation
#0365
Medium Python

365. Water and Jug Problem

#0368
Medium C++

368. Largest Divisible Subset

Dynamic Programming
#0371
Medium C++

371. Sum of Two Integers

#0373
Medium Python

373. Find K Pairs with Smallest Sums

Heap / Priority Queue
#0374
Easy C++

374. Guess Number Higher or Lower

#0377
Medium C++

377. Combination Sum IV

Dynamic Programming
#0380
Medium C++

380. Insert Delete GetRandom O(1)

Hash TableUnion Find
#0382
Medium C++

382. Linked List Random Node

Linked List
#0383
Easy C++

383. Ransom Note

String
#0386
Medium C++ +1

386. Lexicographical Numbers

DFSSorting
#0387
Easy C++ +1

387. First Unique Character in a String

Hash TableString
#0391
Hard C++

391. Perfect Rectangle

Bit Manipulation
#0392
Easy Python

392. Is Subsequence

#0394
Medium C++

394. Decode String

StackString
#0397
Medium C++

397. Integer Replacement

#0399
Medium Python

399. Evaluate Division

DFSHash TableGraph
#0402
Medium C++ +1

402. Remove K Digits

StackString
#0403
Hard C++

403. Frog Jump

Dynamic ProgrammingHash Table
#0404
Easy Python

404. Sum of Left Leaves

DFSTree Traversal
#0406
Medium Python

406. Queue Reconstruction by Height

Sorting
#0409
Easy Python

409. Longest Palindrome

#0410
Hard Python

410. Split Array Largest Sum

Bit Manipulation
#0415
Easy C++

415. Add Strings

String
#0416
Medium C++

416. Partition Equal Subset Sum

Dynamic ProgrammingBit Manipulation
#0417
Medium Python

417. Pacific Atlantic Water Flow

DFSMatrix
#0419
Medium Python

419. Battleships in a Board

DFSMatrix
#0421
Medium C++

421. Maximum XOR of Two Numbers in an Array

Bit ManipulationUnion FindTrie
#0424
Medium Python

424. Longest Repeating Character Replacement

Hash Table
#0427
Medium Python

427. Construct Quad Tree

DFSMatrix
#0433
Medium C++ +1

433. Minimum Genetic Mutation

Hash TableUnion FindString
#0435
Medium Python

435. Non-overlapping Intervals

Sorting
#0436
Medium Python

436. Find Right Interval

Binary SearchSorting
#0438
Medium C++

438. Find All Anagrams in a String

String
#0443
Medium Python

443. String Compression

#0445
Medium Python

445. Add Two Numbers II

Linked List
#0446
Hard C++

446. Arithmetic Slices II - Subsequence

Dynamic ProgrammingHash TableBit Manipulation
#0448
Easy Python

448. Find All Numbers Disappeared in an Array

#0451
Medium C++

451. Sort Characters By Frequency

Hash TableString
#0452
Medium Python

452. Minimum Number of Arrows to Burst Balloons

Sorting
#0456
Medium C++

456. 132 Pattern

Stack
#0459
Easy N/A

459. Repeated Substring Pattern

#0460
Hard C++ +1

460. LFU Cache

Hash TableLinked List
#0461
Easy Python

461. Hamming Distance

Bit Manipulation
#0462
Medium Python

462. Minimum Moves to Equal Array Elements II

Sorting
#0463
Easy C++

463. Island Perimeter

Bit ManipulationMatrix
#0472
Hard Python

472. Concatenated Words

Dynamic ProgrammingDFSHash Table
#0473
Medium Python

473. Matchsticks to Square

SortingBacktracking
#0475
Medium Python

475. Heaters

Sorting
#0476
Easy Python

476. Number Complement

Bit Manipulation
#0485
Easy C++

485. Max Consecutive Ones

#0486
Medium C++

486. Predict the Winner

Dynamic ProgrammingMatrix
#0491
Medium Python

491. Non-decreasing Subsequences

Backtracking
#0494
Medium C++

494. Target Sum

DFS
#0500
Easy Python

500. Keyboard Row

#0502
Hard Python

502. IPO

SortingHeap / Priority Queue
#0503
Medium C++

503. Next Greater Element II

Stack
#0507
Easy C++

507. Perfect Number

#0509
Easy TypeScript

509. Fibonacci Number

Dynamic Programming
#0515
Medium N/A

515. Find Largest Value in Each Tree Row

#0516
Medium C++

516. Longest Palindromic Subsequence

Dynamic ProgrammingBit ManipulationMatrix
#0518
Medium C++

518. Coin Change II

Dynamic ProgrammingBit Manipulation
#0520
Easy Python

520. Detect Capital

#0523
Medium Python

523. Continuous Subarray Sum

#0525
Medium C++

525. Contiguous Array

Hash Table
#0526
Medium Python

526. Beautiful Arrangement

Backtracking
#0528
Medium Python

528. Random Pick with Weight

Binary Search
#0530
Easy Python

530. Minimum Absolute Difference in BST

DFSTree Traversal
#0540
Medium Python

540. Single Element in a Sorted Array

Bit Manipulation
#0542
Medium Python

542. 01 Matrix

Matrix
#0543
Easy Python

543. Diameter of Binary Tree

DFSTree Traversal
#0547
Medium Python

547. Number of Provinces

Union Find
#0550
Medium SQL

1182. Game Play Analysis IV

#0560
Medium C++ +1

560. Subarray Sum Equals K

Hash TablePrefix Sum
#0564
Hard Python

564. Find the Closest Palindrome

Binary Search
#0565
Medium C++

565. Array Nesting

#0566
Easy C++

566. Reshape the Matrix

Two PointersBit ManipulationMatrix
#0567
Medium Python

Permutation In String

#0570
Medium SQL

570. Managers with at Least 5 Direct Reports

#0576
Medium Python

576. Out of Boundary Paths

Dynamic ProgrammingDFS
#0581
Medium Python

581. Shortest Unsorted Continuous Subarray

Sorting
#0583
Medium C++

583. Delete Operation for Two Strings

Dynamic ProgrammingBit ManipulationMatrix
#0584
Easy SQL

584. Find Customer Referee

#0587
Hard Python

587. Erect the Fence

Sorting
#0589
Easy Python

589. N-ary Tree Preorder Traversal

Tree Traversal
#0593
Medium C++

593. Valid Square

Hash TableBit Manipulation
#0594
Easy Python

594. Longest Harmonious Subsequence

Hash Table
#0595
Easy SQL

595. Big Countries

#0600
Hard C++ +1

600. Non-negative Integers without Consecutive Ones

Dynamic ProgrammingBit ManipulationString
#0605
Easy Python

605. Can Place Flowers

#0608
Medium SQL

608. Tree Node

#0611
Medium Python

611. Valid Triangle Number

Sorting
#0621
Medium N/A

621. Task Scheduler

#0624
Medium Python

624. Maximum Distance in Arrays

#0626
Medium SQL

626. Exchange Seats

#0627
Easy SQL

627. Swap Salary

#0629
Hard C++

629. K Inverse Pairs Array

Dynamic ProgrammingBit ManipulationMatrix
#0632
Hard C++

632. Smallest Range Covering Elements from K Lists

Hash TableBit ManipulationMatrix
#0637
Easy Python

637. Average of Levels in Binary Tree

Tree Traversal
#0641
Medium C++

641. Design Circular Deque

#0643
Easy C++

643. Maximum Average Subarray I

#0645
Easy Python

645. Set Mismatch

Hash Table
#0646
Medium C++

646. Maximum Length of Pair Chain

Bit Manipulation
#0647
Medium Python

647. Palindromic Substrings

String
#0648
Medium Python

648. Replace Words

Hash TableTrie
#0649
Medium C++

Dota2 Senate

String
#0650
Medium Python

650. 2 Keys Keyboard

Dynamic Programming
#0652
Medium Python

652. Find Duplicate Subtrees

DFSHash TableTree Traversal
#0653
Easy Python

653. Two Sum IV - Input is a BST

Hash TableTree Traversal
#0658
Medium Python

658. Find K Closest Elements

Sorting
#0661
Easy C++

661. Image Smoother

Dynamic ProgrammingBit ManipulationMatrix
#0662
Medium C++

662. Maximum Width of Binary Tree

Tree TraversalBit Manipulation
#0664
Hard C++ +1

664. Strange Printer

Dynamic ProgrammingMatrixString
#0665
Medium Python

665. Non-decreasing Array

#0668
Hard C++

668. Kth Smallest Number in Multiplication Table

Binary Search
#0670
Medium C++

670. Maximum Swap

String
#0673
Medium C++

673. Number of Longest Increasing Subsequence

#0676
Medium Python

676. Implement Magic Dictionary

Hash TableUnion FindTrie
#0677
Medium Python

677. Map Sum Pairs

Hash TableUnion FindTrie
#0679
Medium Python

24 Game

DFS
#0684
Medium Python

Redundant Connection

DFSHash TableGraph
#0688
Medium C++

688. Knight Probability in Chessboard

Dynamic ProgrammingBit Manipulation
#0689
Hard C++

689. Maximum Sum of 3 Non-Overlapping Subarrays

Binary SearchBit Manipulation
#0691
Hard C++

691. Stickers to Spell Word

Dynamic ProgrammingBit ManipulationString
#0692
Medium Python

692. Top K Frequent Words

Hash TableSorting
#0695
Medium Python

695. Max Area of Island

DFSMatrix
#0697
Easy C++

697. Degree of an Array

Hash Table
#0698
Medium Python

698. Partition to K Equal Sum Subsets

SortingBacktracking
#0703
Easy Python

703. Kth Largest Element in a Stream

Heap / Priority Queue
#0704
Easy Python

704. Binary Search

#0705
Easy C++

705. Design HashSet

Hash Table
#0706
Easy Python

706. Design HashMap

Hash TableLinked List
#0709
Easy Python

709. To Lower Case

#0712
Medium C++

712. Minimum ASCII Delete Sum for Two Strings

Dynamic ProgrammingBit ManipulationMatrix
#0713
Medium C++

713. Subarray Product Less Than K

#0714
Medium C++

Best Time To Buy And Sell Stock With Transaction Fee

Dynamic Programming
#0717
Easy Python

717. 1-bit and 2-bit Characters

#0718
Medium C++

718. Maximum Length of Repeated Subarray

Dynamic ProgrammingBit ManipulationMatrix
#0719
Hard C++ +1

719. Find K-th Smallest Pair Distance

Binary SearchSortingBit Manipulation
#0720
Medium Python

720. Longest Word in Dictionary

Hash TableUnion FindTrie
#0721
Medium C++

721. Accounts Merge

Hash TableBit ManipulationUnion Find
#0724
Easy Python

724. Find Pivot Index

#0725
Medium C++

725. Split Linked List in Parts

Linked List
#0729
Medium Python

729. My Calendar I

Binary Search
#0730
Hard Python

730. Count Different Palindromic Subsequences

Dynamic Programming
#0731
Medium Python

731. My Calendar II

#0732
Hard C++

732. My Calendar III

#0733
Easy Python

733. Flood Fill

DFS
#0735
Medium C++

735. Asteroid Collision

Stack
#0739
Medium C++ +1

739. Daily Temperatures

Stack
#0740
Medium C++

740. Delete and Earn

Dynamic Programming
#0741
Hard C++

741. Cherry Pickup

Dynamic ProgrammingDFSBit Manipulation
#0744
Easy Python

744. Find Smallest Letter Greater Than Target

Binary Search
#0746
Easy Python

746. Min Cost Climbing Stairs

#0749
Hard C++

749. Contain Virus

Bit ManipulationUnion FindMatrix
#0752
Medium C++

752. Open the Lock

Hash TableBit ManipulationUnion Find
#0753
Hard C++

753. Cracking the Safe

DFSHash TableString
#0766
Easy Python

766. Toeplitz Matrix

Hash TableMatrix
#0767
Medium C++

767. Reorganize String

Hash TableBit ManipulationHeap / Priority Queue
#0778
Hard C++

778. Swim in Rising Water

Binary SearchBit ManipulationMatrix
#0779
Medium C++

779. K-th Symbol in Grammar

Bit Manipulation
#0783
Easy Python

783. Minimum Distance Between BST Nodes

DFSTree Traversal
#0785
Medium Python

785. Is Graph Bipartite?

DFSGraph
#0786
Medium C++

786. K-th Smallest Prime Fraction

Binary SearchTwo Pointers
#0787
Medium C++

787. Cheapest Flights Within K Stops

GraphBit Manipulation
#0788
Medium Python

Rotated Digits

#0790
Medium Python

790. Domino and Tromino Tiling

Dynamic Programming
#0792
Medium Python

792. Number of Matching Subsequences

Hash Table
#0796
Easy C++

796. Rotate String

Union FindString
#0797
Medium C++ +1

797. All Paths From Source to Target

DFSGraphBit Manipulation
#0802
Medium C++

802. Find Eventual Safe States

DFSGraphBit Manipulation
#0805
Hard C++

805. Split Array With Same Average

Hash TableBit Manipulation
#0808
Medium C++

808. Soup Servings

Dynamic Programming
#0820
Medium Python

820. Short Encoding of Words

Hash TableTriePrefix Sum
#0821
Easy C++

821. Shortest Distance to a Character

String
#0826
Medium Python

826. Most Profit Assigning Work

Sorting
#0827
Hard C++ +1

827. Making A Large Island

DFSHash TableBit Manipulation
#0828
Hard C++

828. Count Unique Characters of All Substrings of a Given String

String
#0829
Hard Python

829. Consecutive Numbers Sum

#0834
Hard Python

834. Sum of Distances in Tree

DFSHash TableGraph
#0835
Medium Python

835. Image Overlap

Hash TableMatrix
#0837
Medium Python

837. New 21 Game

Dynamic Programming
#0839
Hard C++ +1

839. Similar String Groups

Union FindString
#0841
Medium Python

841. Keys and Rooms

DFS
#0842
Medium C++ +1

842. Split Array into Fibonacci Sequence

DFSBit ManipulationString
#0844
Easy C++

844. Backspace String Compare

String
#0847
Hard C++

847. Shortest Path Visiting All Nodes

Dynamic ProgrammingGraphBit Manipulation
#0850
Hard C++

850. Rectangle Area II

Bit Manipulation
#0851
Medium C++

851. Loud and Rich

DFSGraphBit Manipulation
#0852
Medium Python

852. Peak Index in a Mountain Array

#0854
Hard C++

854. K-Similar Strings

DFSString
#0859
Easy C++

859. Buddy Strings

Hash TableString
#0861
Medium C++

861. Score After Flipping Matrix

Bit ManipulationMatrix
#0862
Hard C++

862. Shortest Subarray with Sum at Least K

Binary SearchBit Manipulation
#0863
Medium N/A

863. All Nodes Distance K in Binary Tree

#0864
Hard C++

864. Shortest Path to Get All Keys

Bit ManipulationMatrixString
#0872
Easy Python

872. Leaf-Similar Trees

DFSTree Traversal
#0875
Medium Python

875. Koko Eating Bananas

#0876
Easy Python

876. Middle of the Linked List

Linked List
#0877
Medium C++

877. Stone Game

Dynamic Programming
#0879
Hard C++ +1

879. Profitable Schemes

Dynamic Programming
#0880
Medium C++

880. Decoded String at Index

String
#0881
Medium C++

881. Boats to Save People

Two Pointers
#0886
Medium Python

886. Possible Bipartition

DFSGraph
#0894
Medium C++

894. All Possible Full Binary Trees

Tree Traversal
#0896
Easy C++

896. Monotonic Array

Monotonic Stack
#0899
Hard C++

899. Orderly Queue

String
#0901
Medium C++

901. Online Stock Span

StackBit Manipulation
#0902
Hard C++ +1

938. Numbers At Most N Given Digit Set

Dynamic ProgrammingString
#0904
Medium Python

904. Fruit Into Baskets

Hash Table
#0905
Easy Python

905. Sort Array By Parity

#0907
Medium C++

907. Sum of Subarray Minimums

Dynamic ProgrammingStack
#0909
Medium Python

909. Snakes and Ladders

#0912
Medium Python

912. Sort an Array

Binary SearchDivide and Conquer
#0916
Medium C++

916. Word Subsets

Hash TableString
#0918
Medium C++ +1

918. Maximum Sum Circular Subarray

#0920
Hard C++

920. Number of Music Playlists

Dynamic Programming
#0921
Medium C++

921. Minimum Add to Make Parentheses Valid

StackString
#0924
Hard C++

924. Minimize Malware Spread

Hash TableGraphBit Manipulation
#0926
Medium Python

926. Flip String to Monotone Increasing

#0928
Hard C++

928. Minimize Malware Spread II

GraphBit ManipulationUnion Find
#0931
Medium C++ +1

931. Minimum Falling Path Sum

Bit ManipulationMatrix
#0933
Easy C++ +1

933. Number of Recent Calls

#0934
Medium Python

934. Shortest Bridge

DFSMatrix
#0938
Easy Python

938. Range Sum of BST

DFSTree Traversal
#0944
Easy Python

944. Delete Columns to Make Sorted

Sorting
#0945
Medium Python

945. Minimum Increment to Make Array Unique

Sorting
#0946
Medium C++

946. Validate Stack Sequences

Stack
#0947
Medium C++

947. Most Stones Removed with Same Row or Column

Bit Manipulation
#0953
Easy Python

953. Verifying an Alien Dictionary

Sorting
#0956
Hard C++

956. Tallest Billboard

Dynamic ProgrammingDFSHash Table
#0958
Medium C++

958. Check Completeness of a Binary Tree

Tree Traversal
#0959
Medium C++

959. Regions Cut By Slashes

DFSBit ManipulationMatrix
#0960
Hard C++

960. Delete Columns to Make Sorted III

Dynamic ProgrammingMatrixString
#0962
Medium C++

962. Maximum Width Ramp

Binary SearchBit Manipulation
#0968
Hard C++

968. Binary Tree Cameras

DFSTree Traversal
#0969
Medium Python

969. Pancake Sorting

#0974
Medium Python

974. Subarray Sums Divisible by K

Hash Table
#0976
Easy Python

976. Largest Perimeter Triangle

Sorting
#0978
Medium C++

978. Longest Turbulent Subarray

Dynamic Programming
#0980
Hard Python

980. Unique Paths III

DFSMatrix
#0981
Medium C++

981. Time Based Key-Value Store

Hash TableBit ManipulationString
#0982
Hard Python

982. Triples with Bitwise AND Equal To Zero

Hash Table
#0983
Medium C++

983. Minimum Cost For Tickets

Dynamic ProgrammingHash Table
#0986
Medium C++

986. Interval List Intersections

Bit Manipulation
#0989
Easy Python

989. Add to Array-Form of Integer

#0992
Hard C++

992. Subarrays with K Different Integers

Hash TableSliding Window
#0996
Hard C++

996. Number of Squareful Arrays

DFSHash Table
#0997
Easy C++

997. Find the Town Judge

Bit Manipulation