摘要:
#-*- coding: UTF-8 -*- #转换法class Solution(object): def isIsomorphic(self, s, t): """ :type s: str :type t: str :rtype: bool """ sdic={} slist=[] tdic= 阅读全文
摘要:
#-*- coding: UTF-8 -*-# Definition for a binary tree node.# class TreeNode(object):# def __init__(self, x):# self.val = x# self.left = None# self.righ 阅读全文
摘要:
#-*- coding: UTF-8 -*-class Solution(object): def getHint(self, secret, guess): """ :type secret: str :type guess: str :rtype: str """ countA,i,numLis 阅读全文
摘要:
#-*- coding: UTF-8 -*-#特定的九个格内1-9的个数至多为1#依次检查每行,每列,每个子九宫格是否出现重复元素,如果出现返回false,否则返回true.class Solution(object): def isValidSudoku(self, board): """ :ty 阅读全文
摘要:
#-*- coding: UTF-8 -*-# The guess API is already defined for you.# @param num, your guess# @return -1 if my number is lower, 1 if my number is higher, 阅读全文
摘要:
#-*- coding: UTF-8 -*-#需要考虑多种情况#以下几种是可以返回的数值#1、以0开头的字符串,如01201215#2、以正负号开头的字符串,如‘+121215’;‘-1215489’#3、1和2和空格混合形式【顺序只能是正负号-0,空格位置可以随意】的:‘+00121515’#4、 阅读全文