[LeetCode] 83. Remove Duplicates from Sorted List
Python # Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next...
Python # Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next...
Python class Solution: def capitalizeTitle(self, title: str) -> str: answer = [] title = title.lower() temp = title.split() ...
Python class Solution: def detectCapitalUse(self, word: str) -> bool: if word.upper() == word or word.lower() == word: return True...
Python class Solution: def checkPerfectNumber(self, num: int) -> bool: if num < 2: return False answer = 1 for ...
Python class Solution: def containsNearbyDuplicate(self, nums: List[int], k: int) -> bool: if len(nums) == len(set(nums)): return ...