[LeetCode] 287. Find the Duplicate Number
Python class Solution: def findDuplicate(self, nums: List[int]) -> int: temp = Counter(nums) for i, v in temp.items(): if ...
Python class Solution: def findDuplicate(self, nums: List[int]) -> int: temp = Counter(nums) for i, v in temp.items(): if ...
Python class Solution: def search(self, nums: List[int], target: int) -> int: if target in nums: return nums.index(target) ...
Python class Solution: def containsDuplicate(self, nums: List[int]) -> bool: if len(nums) == len(set(nums)): return False ...
Python class Solution: @lru_cache def climbStairs(self, n: int) -> int: if n == 0 or n == 1: return 1 return...
Python class Solution: def fib(self, n: int) -> int: a, b = 0, 1 for i in range(n): a, b = a + b, a r...