[LeetCode] 199. Binary Tree Right Side View
Python # Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self...
Python # Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self...
Python class Solution: def strStr(self, haystack: str, needle: str) -> int: if len(needle) == 0 : return 0 else : ...
Python class Solution: def addBinary(self, a: str, b: str) -> str: return format(int(a, 2) + int(b, 2), 'b')
Python class Solution: def intToRoman(self, num: int) -> str: number = [1, 4, 5, 9, 10, 40, 50, 90, 100, 400, 500, 900, 1000] symbol =...
Python class Solution: def removeElement(self, nums: List[int], val: int) -> int: while nums.count(val): nums.remove(val) ...