//注:很多代码未加入,内存分配是否成功的判断!
//二维数组分配问题需注意,leetcode 可以接受变量的a[m][n],自己实现需,int **a = new int [m];for(){a[i] = new int[n]} -- 释放类似
2、 Populating Next Right Pointers in Each Node
4、Insertion Sort List
5、Two Sum
6、Remove Duplicates from Sorted Array
8、Sqrt(x)
10、Remove Duplicates from Sorted Array II
14、Evaluate Reverse Polish Notation
15、Copy List with Random Pointer
16、Remove Duplicates from Sorted List
17、Candy
18、Add Binary
19、Valid Number
21、Word Break
22、Triangle
24、Gas Station
28、Remove Duplicates from Sorted List II
29、Search in Rotated Sorted Array
30、Search in Rotated Sorted Array II
31、Permutations
33、Subsets
34、Subsets II
36、Regular Expression Matching
37、Letter Combinations of a Phone Number
41、Unique Paths
43、N-Queens
44、N-Queens II
45、Binary Tree Level Order Traversal
48、Combinations
50、 Jump Game
51、 Jump Game II
52、 Best Time to Buy and Sell Stock
53、Best Time to Buy and Sell Stock II
54、Best Time to Buy and Sell Stock III
55、Longest Substring Without Repeating Characters
60、Triangle
61、Largest Rectangle in Histogram
63、Decode Ways
65、3Sum
66、3Sum Closest
67、4Sum
68、Longest Palindromic Substring
70、Anagrams
本文精选了LeetCode上的经典算法题目进行深入解析,涵盖了从数组操作到链表处理,从字符串匹配到二叉树遍历等多种类型的问题。通过这些题目的解决思路与实践案例,帮助读者掌握高效算法设计的方法。
174

被折叠的 条评论
为什么被折叠?



