[LeetCode] 121. Best Time to Buy and Sell Stock
Python class Solution: def maxProfit(self, prices: List[int]) -> int: answer = 0 num = sys.maxsize for price in prices: ...
Python class Solution: def maxProfit(self, prices: List[int]) -> int: answer = 0 num = sys.maxsize for price in prices: ...
Python class Solution: def maxSubArray(self, nums: List[int]) -> int: answer = -sys.maxsize sum_num = 0 for num in nums: ...
Python class Solution: def isPowerOfTwo(self, n: int) -> bool: if n == 0: return False while n != 1: if n % 2 ...
Python class Solution: def isPowerOfThree(self, n: int) -> bool: if n == 0: return False while n != 1: if n % ...
Python class Solution: def repeatedCharacter(self, s: str) -> str: temp = {} for i in s: if i not in temp: ...