您当前的位置: 首页 >  leetcode

LeetCode Algorithm 389. 找不同

发布时间:2022-01-09 10:34:32 ,浏览量:0

389. 找不同

Ideas

emmm,排个序,然后挨个比较?

Code Python
class Solution: def findTheDifference(self, s: str, t: str) -> str: s = sorted(s) t = sorted(t) for i, v in enumerate(s): if t[i] != v: return t[i] return t[-1] 
关注
打赏
1688896170
查看更多评论

暂无认证

  • 0浏览

    0关注

    108697博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文
立即登录/注册

微信扫码登录

0.3927s