首页 > 其他 > 详细

LeetCode.540.Single Element in a Sorted Array

时间:2017-04-03 12:44:33      阅读:276      评论:0      收藏:0      [点我收藏+]

技术分享

 

恩, 沙比提

 1 class Solution(object):
 2     def singleNonDuplicate(self, nums):
 3         """
 4         :type nums: List[int]
 5         :rtype: int
 6         """
 7         xorsum = 0
 8         for i in nums:
 9             xorsum = xorsum ^ i
10         return xorsum
11         

 

LeetCode.540.Single Element in a Sorted Array

原文:http://www.cnblogs.com/hexsix/p/6661652.html

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