摘要: 链接:http://oj.leetcode.com/problems/single-number/Given an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?解法:可以根据异或运算的配对性定理可以解此题.配对性定理可以详见:http://wenku.bai 阅读全文
posted @ 2013-10-29 10:23 hbiner 阅读(144) 评论(0) 推荐(0)
摘要: 链接:http://oj.leetcode.com/problems/single-number/Given an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?解法:可以根据异或运算的配对性定理可以解此题.配对性定理可以详见:http://wenku.bai 阅读全文
posted @ 2013-10-29 10:17 hbiner 阅读(91) 评论(0) 推荐(0)