A Collection of LeetCode Patterns
I compile LeetCode patterns here.
A Collection of LeetCode Patterns
LeetCode Patterns
Arrays
Linked List
Priority Queue/Set/Map
- Regret Greedy
Queues and Stacks
Graphs
Trees
Number Theory
Combinatorics
Dynamic programming
Binary Search
- Binary Search Over the Answer
- 875. Koko Eating Bananas
- 3639. Minimum Time to Activate String
- 2594. Minimum Time to Repair Cars
- 2064. Minimized Maximum of Products Distributed to Any Store
- 1011. Capacity To Ship Packages Within D Days
- 2226. Maximum Candies Allocated to K Children
- 1283. Find the Smallest Divisor Given a Threshold
- 1552. Magnetic Force Between Two Balls
- 1760. Minimum Limit of Balls in a Bag
- 2187. Minimum Time to Complete Trips
- 2071. Maximum Number of Tasks You Can Assign ❌
- 1840 D. Wooden Toy Festival
- 1873 E. Building an Aquarium
- 1970 Last Day Where You Still Cross
- 1292. Maximum Side Length of a Square with Sum Less than or Equal to Threshold
This post is licensed under CC BY 4.0 by the author.