Skip to content

Commit ffe5a92

Browse files
Zanger67/leetcodeZanger67/leetcode
authored andcommitted
Updated markdown files
1 parent 95e8873 commit ffe5a92

File tree

9 files changed

+46
-8
lines changed

9 files changed

+46
-8
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# **[LeetCode Records](https://leetcode.com/u/Zanger/)** (640 solved)
1+
# **[LeetCode Records](https://leetcode.com/u/Zanger/)** (641 solved)
22

33
<!-- This readme was generated using [WikiLeet](<https://github.com/Zanger67/WikiLeet>) -->
44

@@ -105,6 +105,7 @@ This repo is a collection of my LeetCode solutions, primarily written in Python,
105105
| 114 | [Flatten Binary Tree to Linked List](<https://leetcode.com/problems/flatten-binary-tree-to-linked-list>) | Medium | | [solution](<markdowns/_114. Flatten Binary Tree to Linked List.md>) | c, py |
106106
| 118 | [Pascal's Triangle](<https://leetcode.com/problems/pascals-triangle>) | Easy | Daily | [solution](<markdowns/_118. Pascal's Triangle.md>) | py |
107107
| 121 | [Best Time to Buy and Sell Stock](<https://leetcode.com/problems/best-time-to-buy-and-sell-stock>) | Easy | B75, N150 | [solution](<markdowns/_121. Best Time to Buy and Sell Stock.md>) | py |
108+
| 122 | [Best Time to Buy and Sell Stock II](<https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii>) | Medium | | [solution](<markdowns/_122. Best Time to Buy and Sell Stock II.md>) | py |
108109
| 124 | [Binary Tree Maximum Path Sum](<https://leetcode.com/problems/binary-tree-maximum-path-sum>) | Hard | B75, N150 | [solution](<markdowns/_124. Binary Tree Maximum Path Sum.md>) | py |
109110
| 125 | [Valid Palindrome](<https://leetcode.com/problems/valid-palindrome>) | Easy | B75, N150 | [solution](<markdowns/_125. Valid Palindrome.md>) | c, py |
110111
| 128 | [Longest Consecutive Sequence](<https://leetcode.com/problems/longest-consecutive-sequence>) | Medium | B75, N150 | [solution](<markdowns/_128. Longest Consecutive Sequence.md>) | java, py |

markdowns/Medium.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Medium Questions (411)
1+
# Medium Questions (412)
22

33
*[Back to top](<../README.md>)*
44

@@ -44,6 +44,7 @@
4444
| 107 | [Binary Tree Level Order Traversal II](<https://leetcode.com/problems/binary-tree-level-order-traversal-ii>) | Medium | | [solution](<_107. Binary Tree Level Order Traversal II.md>) | java | Jul 04, 2024 |
4545
| 113 | [Path Sum II](<https://leetcode.com/problems/path-sum-ii>) | Medium | | [solution](<_113. Path Sum II.md>) | py | Jul 03, 2024 |
4646
| 114 | [Flatten Binary Tree to Linked List](<https://leetcode.com/problems/flatten-binary-tree-to-linked-list>) | Medium | | [solution](<_114. Flatten Binary Tree to Linked List.md>) | c, py | Jun 11, 2024 |
47+
| 122 | [Best Time to Buy and Sell Stock II](<https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii>) | Medium | | [solution](<_122. Best Time to Buy and Sell Stock II.md>) | py | Aug 27, 2025 |
4748
| 128 | [Longest Consecutive Sequence](<https://leetcode.com/problems/longest-consecutive-sequence>) | Medium | B75, N150 | [solution](<_128. Longest Consecutive Sequence.md>) | java, py | Jun 13, 2024 |
4849
| 129 | [Sum Root to Leaf Numbers](<https://leetcode.com/problems/sum-root-to-leaf-numbers>) | Medium | | [solution](<_129. Sum Root to Leaf Numbers.md>) | py | Jun 07, 2024 |
4950
| 131 | [Palindrome Partitioning](<https://leetcode.com/problems/palindrome-partitioning>) | Medium | N150 | [solution](<_131. Palindrome Partitioning.md>) | py | Jul 30, 2024 |

markdowns/Questions_By_Code_Length.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,7 @@ Calculations are based on the code files's byte sizes.
626626
| 1636 | [Sort Array by Increasing Frequency](<https://leetcode.com/problems/sort-array-by-increasing-frequency>) | Easy | Daily | [solution](<_1636. Sort Array by Increasing Frequency.md>) | py | Jul 23, 2024 |
627627
| 69 | [Sqrt(x)](<https://leetcode.com/problems/sqrtx>) | Easy | | [solution](<_69. Sqrt(x).md>) | py | Jun 07, 2024 |
628628
| 176 | [Second Highest Salary](<https://leetcode.com/problems/second-highest-salary>) | Medium | | [solution](<_176. Second Highest Salary.md>) | sql | May 22, 2024 |
629+
| 122 | [Best Time to Buy and Sell Stock II](<https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii>) | Medium | | [solution](<_122. Best Time to Buy and Sell Stock II.md>) | py | Aug 27, 2025 |
629630
| 509 | [Fibonacci Number](<https://leetcode.com/problems/fibonacci-number>) | Easy | | [solution](<_509. Fibonacci Number.md>) | c | Jun 17, 2024 |
630631
| 1207 | [Unique Number of Occurrences](<https://leetcode.com/problems/unique-number-of-occurrences>) | Easy | | [solution](<_1207. Unique Number of Occurrences.md>) | py | Sep 25, 2024 |
631632
| 1408 | [String Matching in an Array](<https://leetcode.com/problems/string-matching-in-an-array>) | Easy | Daily | [solution](<_1408. String Matching in an Array.md>) | py | Jan 07, 2025 |

markdowns/Questions_By_Recent.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Calculations are based on the date of the first solve.
66

77
| # | Title | Level | Cats | Solution | Languages | Date Complete |
88
|-----:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------|:--------------------------|:----------------------------------------------------------------------------------------------------|:--------------------------------------------|:----------------|
9+
| 122 | [Best Time to Buy and Sell Stock II](<https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii>) | Medium | | [solution](<_122. Best Time to Buy and Sell Stock II.md>) | py | Aug 27, 2025 |
910
| 792 | [Number of Matching Subsequences](<https://leetcode.com/problems/number-of-matching-subsequences>) | Medium | | [solution](<_792. Number of Matching Subsequences.md>) | py | Aug 27, 2025 |
1011
| 1198 | [Find Smallest Common Element in All Rows](<https://leetcode.com/problems/find-smallest-common-element-in-all-rows>) | Medium | | [solution](<_1198. Find Smallest Common Element in All Rows.md>) | py | Aug 26, 2025 |
1112
| 3000 | [Maximum Area of Longest Diagonal Rectangle](<https://leetcode.com/problems/maximum-area-of-longest-diagonal-rectangle>) | Easy | Daily | [solution](<_3000. Maximum Area of Longest Diagonal Rectangle.md>) | py | Aug 26, 2025 |

markdowns/Topics.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
------
66

7-
- [Array](<by_topic/Array.md>) (322 completed)
7+
- [Array](<by_topic/Array.md>) (323 completed)
88
- [String](<by_topic/String.md>) (150 completed)
99
- [Hash Table](<by_topic/Hash Table.md>) (145 completed)
1010
- [Depth-First Search](<by_topic/Depth-First Search.md>) (105 completed)
@@ -14,10 +14,10 @@
1414
- [Sorting](<by_topic/Sorting.md>) (76 completed)
1515
- [Breadth-First Search](<by_topic/Breadth-First Search.md>) (73 completed)
1616
- [Two Pointers](<by_topic/Two Pointers.md>) (61 completed)
17-
- [Dynamic Programming](<by_topic/Dynamic Programming.md>) (57 completed)
17+
- [Dynamic Programming](<by_topic/Dynamic Programming.md>) (58 completed)
1818
- [Matrix](<by_topic/Matrix.md>) (56 completed)
1919
- [Stack](<by_topic/Stack.md>) (56 completed)
20-
- [Greedy](<by_topic/Greedy.md>) (50 completed)
20+
- [Greedy](<by_topic/Greedy.md>) (51 completed)
2121
- [Linked List](<by_topic/Linked List.md>) (45 completed)
2222
- [Simulation](<by_topic/Simulation.md>) (44 completed)
2323
- [Binary Search](<by_topic/Binary Search.md>) (37 completed)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# 122. [Best Time to Buy and Sell Stock II](<https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii>)
2+
3+
*All prompts are owned by LeetCode. To view the prompt, click the title link above.*
4+
5+
*[Back to top](<../README.md>)*
6+
7+
------
8+
9+
> *First completed : August 27, 2025*
10+
>
11+
> *Last updated : August 27, 2025*
12+
13+
------
14+
15+
> **Related Topics** : **[Array](<by_topic/Array.md>), [Dynamic Programming](<by_topic/Dynamic Programming.md>), [Greedy](<by_topic/Greedy.md>)**
16+
>
17+
> **Acceptance Rate** : **69.9 %**
18+
19+
------
20+
21+
## Solutions
22+
23+
- [m122.py](<../my-submissions/m122.py>)
24+
### Python
25+
#### [m122.py](<../my-submissions/m122.py>)
26+
```Python
27+
class Solution:
28+
def maxProfit(self, prices: List[int]) -> int:
29+
return sum(filter(lambda x: x > 0, [y - x for x, y in zip(prices[:-1], prices[1:])]))
30+
```
31+

markdowns/by_topic/Array.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# [Array](<https://leetcode.com/tag/Array/>) (322 completed)
1+
# [Array](<https://leetcode.com/tag/Array/>) (323 completed)
22

33
*[Back to top](<../../README.md>)*
44

@@ -32,6 +32,7 @@
3232
| 90 | [Subsets II](<https://leetcode.com/problems/subsets-ii>) | Medium | N150 | [solution](<../_90. Subsets II.md>) | py | Jul 03, 2024 |
3333
| 118 | [Pascal's Triangle](<https://leetcode.com/problems/pascals-triangle>) | Easy | Daily | [solution](<../_118. Pascal's Triangle.md>) | py | May 22, 2024 |
3434
| 121 | [Best Time to Buy and Sell Stock](<https://leetcode.com/problems/best-time-to-buy-and-sell-stock>) | Easy | B75, N150 | [solution](<../_121. Best Time to Buy and Sell Stock.md>) | py | Jul 03, 2024 |
35+
| 122 | [Best Time to Buy and Sell Stock II](<https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii>) | Medium | | [solution](<../_122. Best Time to Buy and Sell Stock II.md>) | py | Aug 27, 2025 |
3536
| 128 | [Longest Consecutive Sequence](<https://leetcode.com/problems/longest-consecutive-sequence>) | Medium | B75, N150 | [solution](<../_128. Longest Consecutive Sequence.md>) | java, py | Jun 13, 2024 |
3637
| 136 | [Single Number](<https://leetcode.com/problems/single-number>) | Easy | N150 | [solution](<../_136. Single Number.md>) | py | Jul 03, 2024 |
3738
| 150 | [Evaluate Reverse Polish Notation](<https://leetcode.com/problems/evaluate-reverse-polish-notation>) | Medium | N150 | [solution](<../_150. Evaluate Reverse Polish Notation.md>) | py | Jun 11, 2024 |

markdowns/by_topic/Dynamic Programming.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# [Dynamic Programming](<https://leetcode.com/tag/Dynamic-Programming/>) (57 completed)
1+
# [Dynamic Programming](<https://leetcode.com/tag/Dynamic-Programming/>) (58 completed)
22

33
*[Back to top](<../../README.md>)*
44

@@ -13,6 +13,7 @@
1313
| 70 | [Climbing Stairs](<https://leetcode.com/problems/climbing-stairs>) | Easy | B75, N150 | [solution](<../_70. Climbing Stairs.md>) | py | May 22, 2024 |
1414
| 118 | [Pascal's Triangle](<https://leetcode.com/problems/pascals-triangle>) | Easy | Daily | [solution](<../_118. Pascal's Triangle.md>) | py | May 22, 2024 |
1515
| 121 | [Best Time to Buy and Sell Stock](<https://leetcode.com/problems/best-time-to-buy-and-sell-stock>) | Easy | B75, N150 | [solution](<../_121. Best Time to Buy and Sell Stock.md>) | py | Jul 03, 2024 |
16+
| 122 | [Best Time to Buy and Sell Stock II](<https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii>) | Medium | | [solution](<../_122. Best Time to Buy and Sell Stock II.md>) | py | Aug 27, 2025 |
1617
| 124 | [Binary Tree Maximum Path Sum](<https://leetcode.com/problems/binary-tree-maximum-path-sum>) | Hard | B75, N150 | [solution](<../_124. Binary Tree Maximum Path Sum.md>) | py | Jul 04, 2024 |
1718
| 131 | [Palindrome Partitioning](<https://leetcode.com/problems/palindrome-partitioning>) | Medium | N150 | [solution](<../_131. Palindrome Partitioning.md>) | py | Jul 30, 2024 |
1819
| 198 | [House Robber](<https://leetcode.com/problems/house-robber>) | Medium | B75, N150 | [solution](<../_198. House Robber.md>) | py | Jul 17, 2024 |

0 commit comments

Comments
 (0)