摘要:
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: 阅读全文
posted @ 2020-05-09 14:32
星海寻梦233
阅读(63)
评论(0)
推荐(0)
摘要:
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: 阅读全文
posted @ 2020-05-09 14:31
星海寻梦233
阅读(88)
评论(0)
推荐(0)
摘要:
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: 阅读全文
posted @ 2020-05-09 14:30
星海寻梦233
阅读(89)
评论(0)
推荐(0)
摘要:
class Solution: def isPalindrome(self, x: int) -> bool: if x < 0: return False else: x_copy = x pal_num = 0 while x: pal_num = pal_num *10 + x % 10 x 阅读全文
posted @ 2020-05-09 14:27
星海寻梦233
阅读(87)
评论(0)
推荐(0)
摘要:
class Solution: def reverse(self, x: int) -> int: isNegative = x < 0 sum = 0 abs_x = abs(x) while abs_x: sum = sum * 10 i = abs_x % 10 sum = sum + i a 阅读全文
posted @ 2020-05-09 14:11
星海寻梦233
阅读(114)
评论(0)
推荐(0)
摘要:
class Solution: def twoSum(self, nums, target): """ :param nums: List[int] :param target:int :return:Lsit[int] """ reverse = {} for i , v in enumerate 阅读全文
posted @ 2020-05-09 14:09
星海寻梦233
阅读(94)
评论(0)
推荐(0)