leetcode
三三3333三三
这个作者很懒,什么都没留下…
展开
-
Add Two Numbers
问题:You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and retur原创 2017-05-30 17:13:12 · 376 阅读 · 0 评论 -
异或的一些有趣的应用
异或的性质: 1、交换律 2、结合律 3、对于任何x,都有x xor x = 0, x xor 0 =x 1、交换两变量的值(不使用额外的空间): a = a xor b; b = b xor a; a = a xor b; 2、1-1000个数放在含有1001个元素的数组中,只有唯一的一个元素重复,其他均只出现一次。每个数组元素只能访问一次,设计一个算法,将它找出来(不使用辅助存转载 2017-06-08 20:26:17 · 325 阅读 · 0 评论