乐趣区

关于java:leetCode刷题顺序

leetCode 题太多了,本人还是一个非计算机专业的小白,所有问题都刷他艰难了,所以筛选典型的进行刷,而后本人总结。以下为须要刷的类型和题目,没有行号,我每刷过一个道在加行号;每一个模块完后会总结思路;
刷的题目是参考其余博主的,然而学到货色是本人的。


1. Pattern: Sliding window,滑动窗口类型

Maximum Sum Subarray of Size K (easy)
Smallest Subarray with a given sum (easy)
Longest Substring with K Distinct Characters (medium)
Fruits into Baskets (medium)
No-repeat Substring (hard)
Longest Substring with Same Letters after Replacement (hard)
Longest Subarray with Ones after Replacement (hard)

2.Pattern: two points, 双指针类型

Pair with Target Sum (easy)
Remove Duplicates (easy)
Squaring a Sorted Array (easy)
Triplet Sum to Zero (medium)
Triplet Sum Close to Target (medium)
Triplets with Smaller Sum (medium)
Subarrays with Product Less than a Target (medium)
Dutch National Flag Problem (medium)

3.Pattern: Fast & Slow pointers, 快慢指针类型

LinkedList Cycle (easy)
Start of LinkedList Cycle (medium)
Happy Number (medium)
Middle of the LinkedList (easy)

4.Pattern: Merge Intervals,区间合并类型

Merge Intervals (medium)
Insert Interval (medium)
Intervals Intersection (medium)
Conflicting Appointments (medium)

5. Pattern: Cyclic Sort,循环排序

Cyclic Sort (easy)
Find the Missing Number (easy)
Find all Missing Numbers (easy)
Find the Duplicate Number (easy)
Find all Duplicate Numbers (easy)

6.Pattern: In-place Reversal of a LinkedList,链表翻转

Reverse a LinkedList (easy)
Reverse a Sub-list (medium)
Reverse every K-element Sub-list (medium)

7.Pattern: Tree Breadth First Search,树上的 BFS

Binary Tree Level Order Traversal (easy)
Reverse Level Order Traversal (easy)
Zigzag Traversal (medium)
Level Averages in a Binary Tree (easy)
Minimum Depth of a Binary Tree (easy)
Level Order Successor (easy)
Connect Level Order Siblings (medium)

8.Pattern: Tree Depth First Search,树上的 DFS

Binary Tree Path Sum (easy)
All Paths for a Sum (medium)
Sum of Path Numbers (medium)
Path With Given Sequence (medium)
Count Paths for a Sum (medium)

9. Pattern: Two Heaps,双堆类型

Find the Median of a Number Stream (medium)
Sliding Window Median (hard)
Maximize Capital (hard)

10. Pattern: Subsets,子集类型,个别都是应用多重 DFS

Subsets (easy)
Subsets With Duplicates (easy)
Permutations (medium)
String Permutations by changing case (medium)
Balanced Parentheses (hard)
Unique Generalized Abbreviations (hard)

11. Pattern: Modified Binary Search,革新过的二分

Order-agnostic Binary Search (easy)
Ceiling of a Number (medium)
Next Letter (medium)
Number Range (medium)
Search in a Sorted Infinite Array (medium)
Minimum Difference Element (medium)
Bitonic Array Maximum (easy)

12. Pattern: Top‘K’Elements,前 K 个系列

Top‘K’Numbers (easy)
Kth Smallest Number (easy)
‘K’Closest Points to the Origin (easy)
Connect Ropes (easy)
Top‘K’Frequent Numbers (medium)
Frequency Sort (medium)
Kth Largest Number in a Stream (medium)
‘K’Closest Numbers (medium)
Maximum Distinct Elements (medium)
Sum of Elements (medium)
Rearrange String (hard)

13. Pattern: K-way merge,多路归并

Merge K Sorted Lists (medium)
Kth Smallest Number in M Sorted Lists (Medium)
Kth Smallest Number in a Sorted Matrix (Hard)
Smallest Number Range (Hard)

14. Pattern: 0/1 Knapsack (Dynamic Programming),0/ 1 背包类型

0/1 Knapsack (medium)
Equal Subset Sum Partition (medium)
Subset Sum (medium)
Minimum Subset Sum Difference (hard)

15. Pattern: Topological Sort (Graph),拓扑排序类型

Topological Sort (medium)
Tasks Scheduling (medium)
Tasks Scheduling Order (medium)
All Tasks Scheduling Orders (hard)
Alien Dictionary (hard)

动静布局专题 BP

  1. 0/1 Knapsack, 0/ 1 背包,6 个题

0/1 Knapsack,0/ 1 背包问题

Equal Subset Sum Partition,相等子集划分问题

Subset Sum,子集和问题

Minimum Subset Sum Difference,子集和的最小差问题

Count of Subset Sum,相等子集和的个数问题

Target Sum,寻找指标和的问题

  1. Unbounded Knapsack,有限背包,5 个题

Unbounded Knapsack,有限背包

Rod Cutting,切钢条问题

Coin Change,换硬币问题

Minimum Coin Change,凑齐每个数须要的起码硬币问题

Maximum Ribbon Cut,丝带的最大值切法

  1. Fibonacci Numbers,斐波那契数列,6 个题

Fibonacci numbers,斐波那契数列问题

Staircase,爬楼梯问题

Number factors,合成因子问题

Minimum jumps to reach the end,蛙跳最小步数问题

Minimum jumps with fee,蛙跳带有代价的问题

House thief,偷房子问题

  1. Palindromic Subsequence,回文子系列,5 个题

Longest Palindromic Subsequence,最长回文子序列

Longest Palindromic Substring,最长回文子字符串

Count of Palindromic Substrings,最长子字符串的个数问题

Minimum Deletions in a String to make it a Palindrome,怎么删掉起码字符形成回文

Palindromic Partitioning,怎么调配字符,造成回文

  1. Longest Common Substring,最长子字符串系列,13 个题

Longest Common Substring,最长雷同子串

Longest Common Subsequence,最长雷同子序列

Minimum Deletions & Insertions to Transform a String into another,字符串变换

Longest Increasing Subsequence,最长回升子序列

Maximum Sum Increasing Subsequence,最长回升子序列和

Shortest Common Super-sequence,最短超级子序列

Minimum Deletions to Make a Sequence Sorted,起码删除变换出子序列

Longest Repeating Subsequence,最长重复子序列

Subsequence Pattern Matching,子序列匹配

Longest Bitonic Subsequence,最长字节子序列

Longest Alternating Subsequence,最长交差变换子序列

Edit Distance,编辑间隔

Strings Interleaving,交错字符串

退出移动版