Skip to content

Commit c3856a7

Browse files
committed
增加经典题目
1 parent 45468fd commit c3856a7

16 files changed

+2750
-109
lines changed

docs/0000-01-modified-binary-search.adoc

Lines changed: 292 additions & 16 deletions
Large diffs are not rendered by default.

docs/0000-03-prefix-sum.adoc

Lines changed: 196 additions & 2 deletions
Large diffs are not rendered by default.

docs/0000-06-two-pointer.adoc

Lines changed: 204 additions & 24 deletions
Large diffs are not rendered by default.

docs/0000-08-quickselect.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
. xref:0215-kth-largest-element-in-an-array.adoc[215. Kth Largest Element in an Array]
1616
. xref:0324-wiggle-sort-ii.adoc[324. Wiggle Sort II]
17-
. xref:0347-top-k-frequent-elements.adoc[347. K 个高频元素]
17+
. xref:0347-top-k-frequent-elements.adoc[347. Top K Frequent Elements]
1818
. xref:0973-k-closest-points-to-origin.adoc[973. K Closest Points to Origin]
1919
. xref:1738-find-kth-largest-xor-coordinate-value.adoc[1738. Find Kth Largest XOR Coordinate Value]
2020
. xref:1985-find-the-kth-largest-integer-in-the-array.adoc[1985. Find the Kth Largest Integer in the Array]

docs/0000-09-sliding-window.adoc

Lines changed: 139 additions & 24 deletions
Large diffs are not rendered by default.

docs/0000-10-monotonic-stack.adoc

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,70 @@ for (int i = 1; i < nums.length; i++) {
5353

5454
. xref:0042-trapping-rain-water.adoc[42. Trapping Rain Water] -- 这个单调栈,在中间过程加了一些操作,有意思。
5555
. xref:0084-largest-rectangle-in-histogram.adoc[84. Largest Rectangle in Histogram]
56+
. xref:0085-maximal-rectangle.adoc[85. Maximal Rectangle]
5657
. xref:0155-min-stack.adoc[155. Min Stack] -- 这个辅助栈也可以认为是一种单调栈。
57-
. xref:0239-sliding-window-maximum.adoc[239. Sliding Window Maximum]
58+
. xref:0255-verify-preorder-sequence-in-binary-search-tree.adoc[255. Verify Preorder Sequence in Binary Search Tree]
5859
. xref:0316-remove-duplicate-letters.adoc[316. Remove Duplicate Letters]
60+
. xref:0321-create-maximum-number.adoc[321. Create Maximum Number]
5961
. xref:0402-remove-k-digits.adoc[402. Remove K Digits]
62+
. xref:0456-132-pattern.adoc[456. 132 Pattern]
6063
. xref:0496-next-greater-element-i.adoc[496. Next Greater Element I]
6164
. xref:0503-next-greater-element-ii.adoc[503. Next Greater Element II]
6265
. xref:0581-shortest-unsorted-continuous-subarray.adoc[581. Shortest Unsorted Continuous Subarray]
6366
. xref:0654-maximum-binary-tree.adoc[654. Maximum Binary Tree]
6467
. xref:0739-daily-temperatures.adoc[739. Daily Temperatures]
65-
. xref:0901-online-stock-span.adoc[901. Online Stock Span]
6668
. xref:0768-max-chunks-to-make-sorted-ii.adoc[768. Max Chunks To Make Sorted II]
69+
. xref:0769-max-chunks-to-make-sorted.adoc[769. Max Chunks To Make Sorted]
70+
. xref:0853-car-fleet.adoc[853. Car Fleet]
71+
. xref:0901-online-stock-span.adoc[901. Online Stock Span]
72+
. xref:0907-sum-of-subarray-minimums.adoc[907. Sum of Subarray Minimums]
73+
. xref:0962-maximum-width-ramp.adoc[962. Maximum Width Ramp]
74+
. xref:0975-odd-even-jump.adoc[975. Odd Even Jump]
75+
. xref:1008-construct-binary-search-tree-from-preorder-traversal.adoc[1008. Construct Binary Search Tree from Preorder Traversal]
76+
. xref:1019-next-greater-node-in-linked-list.adoc[1019. Next Greater Node In Linked List]
77+
. xref:1063-number-of-valid-subarrays.adoc[1063. Number of Valid Subarrays]
78+
. xref:1081-smallest-subsequence-of-distinct-characters.adoc[1081. Smallest Subsequence of Distinct Characters]
79+
. xref:1124-longest-well-performing-interval.adoc[1124. Longest Well-Performing Interval]
80+
. xref:1130-minimum-cost-tree-from-leaf-values.adoc[1130. Minimum Cost Tree From Leaf Values]
81+
. xref:1475-final-prices-with-a-special-discount-in-a-shop.adoc[1475. Final Prices With a Special Discount in a Shop]
82+
. xref:1504-count-submatrices-with-all-ones.adoc[1504. Count Submatrices With All Ones]
83+
. xref:1526-minimum-number-of-increments-on-subarrays-to-form-a-target-array.adoc[1526. Minimum Number of Increments on Subarrays to Form a Target Array]
84+
. xref:1574-shortest-subarray-to-be-removed-to-make-array-sorted.adoc[1574. Shortest Subarray to be Removed to Make Array Sorted]
85+
. xref:1673-find-the-most-competitive-subsequence.adoc[1673. Find the Most Competitive Subsequence]
86+
. xref:1762-buildings-with-an-ocean-view.adoc[1762. Buildings With an Ocean View]
87+
. xref:1776-car-fleet-ii.adoc[1776. Car Fleet II]
88+
. xref:1793-maximum-score-of-a-good-subarray.adoc[1793. Maximum Score of a Good Subarray]
89+
. xref:1856-maximum-subarray-min-product.adoc[1856. Maximum Subarray Min-Product]
90+
. xref:1944-number-of-visible-people-in-a-queue.adoc[1944. Number of Visible People in a Queue]
91+
. xref:1950-maximum-of-minimum-values-in-all-subarrays.adoc[1950. Maximum of Minimum Values in All Subarrays]
92+
. xref:1996-the-number-of-weak-characters-in-the-game.adoc[1996. The Number of Weak Characters in the Game]
93+
. xref:2030-smallest-k-length-subsequence-with-occurrences-of-a-letter.adoc[2030. Smallest K-Length Subsequence With Occurrences of a Letter]
94+
. xref:2104-sum-of-subarray-ranges.adoc[2104. Sum of Subarray Ranges]
95+
. xref:2281-sum-of-total-strength-of-wizards.adoc[2281. Sum of Total Strength of Wizards]
96+
. xref:2282-number-of-people-that-can-be-seen-in-a-grid.adoc[2282. Number of People That Can Be Seen in a Grid]
97+
. xref:2289-steps-to-make-array-non-decreasing.adoc[2289. Steps to Make Array Non-decreasing]
98+
. xref:2297-jump-game-viii.adoc[2297. Jump Game VIII]
99+
. xref:2334-subarray-with-elements-greater-than-varying-threshold.adoc[2334. Subarray With Elements Greater Than Varying Threshold]
100+
. xref:2345-finding-the-number-of-visible-mountains.adoc[2345. Finding the Number of Visible Mountains]
101+
. xref:2355-maximum-number-of-books-you-can-take.adoc[2355. Maximum Number of Books You Can Take]
102+
. xref:2454-next-greater-element-iv.adoc[2454. Next Greater Element IV]
103+
. xref:2487-remove-nodes-from-linked-list.adoc[2487. Remove Nodes From Linked List]
104+
. xref:2617-minimum-number-of-visited-cells-in-a-grid.adoc[2617. Minimum Number of Visited Cells in a Grid]
105+
. xref:2736-maximum-sum-queries.adoc[2736. Maximum Sum Queries]
106+
. xref:2818-apply-operations-to-maximize-score.adoc[2818. Apply Operations to Maximize Score]
107+
. xref:2832-maximal-range-that-each-element-is-maximum-in-it.adoc[2832. Maximal Range That Each Element Is Maximum in It]
108+
. xref:2863-maximum-length-of-semi-decreasing-subarrays.adoc[2863. Maximum Length of Semi-Decreasing Subarrays]
109+
. xref:2865-beautiful-towers-i.adoc[2865. Beautiful Towers I]
110+
. xref:2866-beautiful-towers-ii.adoc[2866. Beautiful Towers II]
111+
. xref:2940-find-building-where-alice-and-bob-can-meet.adoc[2940. Find Building Where Alice and Bob Can Meet]
112+
. xref:2945-find-maximum-non-decreasing-array-length.adoc[2945. Find Maximum Non-decreasing Array Length]
113+
. xref:3113-find-the-number-of-subarrays-where-boundary-elements-are-maximum.adoc[3113. Find the Number of Subarrays Where Boundary Elements Are Maximum]
114+
. xref:3205-maximum-array-hopping-score-i.adoc[3205. Maximum Array Hopping Score I]
115+
. xref:3221-maximum-array-hopping-score-ii.adoc[3221. Maximum Array Hopping Score II]
116+
. xref:3229-minimum-operations-to-make-array-equal-to-target.adoc[3229. Minimum Operations to Make Array Equal to Target]
117+
. xref:3359-find-sorted-submatrices-with-maximum-element-at-most-k.adoc[3359. Find Sorted Submatrices With Maximum Element at Most K]
118+
. xref:3420-count-non-decreasing-subarrays-after-k-operations.adoc[3420. Count Non-Decreasing Subarrays After K Operations]
119+
. xref:3430-maximum-and-minimum-sums-of-at-most-size-k-subarrays.adoc[3430. Maximum and Minimum Sums of at Most Size K Subarrays]
67120

68121

69122
== 参考资料

0 commit comments

Comments
 (0)