我是靠谱客的博主 敏感红牛,这篇文章主要介绍【力扣-136只出现一次的数字】位运算-异或(python3)题目描述思路题解,现在分享给大家,希望可以做个参考。

目录

  • 题目描述
  • 思路题解

题目描述

https://leetcode-cn.com/problems/single-number/

思路题解

https://leetcode-cn.com/problems/single-number/solution/zhi-chu-xian-yi-ci-de-shu-zi-by-leetcode-solution/

class Solution:
    def singleNumber(self, nums: List[int]) -> int:
        return reduce(lambda x,y:x^y,nums)

最后

以上就是敏感红牛最近收集整理的关于【力扣-136只出现一次的数字】位运算-异或(python3)题目描述思路题解的全部内容,更多相关【力扣-136只出现一次内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(50)

评论列表共有 0 条评论

立即
投稿
返回
顶部