[LeetCode] 2236. Root Equals Sum of Children
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 getConcatenation(self, nums: List[int]) -> List[int]: return nums + nums
Python class Solution: def buildArray(self, nums: List[int]) -> List[int]: answer = [] for i in nums: answer.append(nums[i...
Python class Solution: def sum(self, num1: int, num2: int) -> int: return num1 + num2
Python class Solution: def runningSum(self, nums: List[int]) -> List[int]: answer = [] for i in range(len(nums)): answer.a...