首页 > 其他 > 详细

leetcode——389. 找不同

时间:2019-10-25 12:45:09      阅读:75      评论:0      收藏:0      [点我收藏+]

简单题

class Solution(object):
    def findTheDifference(self, s, t):
        """
        :type s: str
        :type t: str
        :rtype: str
        """
        for i in range(len(t)):
            if t.count(t[i])!=s.count(t[i]) or t[i] not in s:
                return t[i]
执行用时 :16 ms, 在所有 python 提交中击败了98.07%的用户
内存消耗 :11.8 MB, 在所有 python 提交中击败了25.81%的用户
 
——2019.10.25

leetcode——389. 找不同

原文:https://www.cnblogs.com/taoyuxin/p/11737166.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!