[LeetCode] 121. Best Time to Buy and Sell Stock
Python ~~~python class Solution: def maxProfit(self, prices: List[int]) -> int: profit = 0 min_price = sys.maxsize
Python ~~~python class Solution: def maxProfit(self, prices: List[int]) -> int: profit = 0 min_price = sys.maxsize
Python class Solution: def mostCommonWord(self, paragraph: str, banned: List[str]) -> str: words = [word for word in re.sub(r"[^\w]", ' ', par...
Python ~~~python class Solution: def longestPalindrome(self, s: str) -> str: def expand(left: int, right: int) -> str: while le...
Python class Solution: def groupAnagrams(self, strs: List[str]) -> List[List[str]]: anagrams = collections.defaultdict(list) for word ...
Python class Solution: def reorderLogFiles(self, logs: List[str]) -> List[str]: letters, digits = [], [] for log in logs: ...