Skip to content

Commit aaf73b9

Browse files
committed
relocate
1 parent 75a3c4a commit aaf73b9

File tree

129 files changed

+613
-153
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+613
-153
lines changed
File renamed without changes.
File renamed without changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# https://leetcode.com/problems/apply-bitwise-operations-to-make-strings-equal/description/
2+
3+
4+
class Solution:
5+
def makeStringsEqual(self, s: str, target: str) -> bool:
6+
return ("1" in s) == ("1" in target)

leetcode/array/best_time_to_buy_and_sell_stock.py

Lines changed: 0 additions & 12 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# https://leetcode.com/problems/best-time-to-buy-and-sell-stock/
2+
3+
class Solution:
4+
def maxProfit(self, prices: list[int]) -> int:
5+
max_profit, min_p = 0, float("inf")
6+
7+
for p in prices:
8+
max_profit = max(p - min_p, max_profit)
9+
min_p = min(p, min_p)
10+
11+
return max_profit

0 commit comments

Comments
 (0)