LeetCode
cansen0426
这个作者很懒,什么都没留下…
展开
-
461. Hamming Distance
The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, calculate the Hamming distance. Note: 0 ≤ x,原创 2017-04-20 20:05:47 · 141 阅读 · 0 评论 -
476. Number Complement
Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation. Note: The given integer is guaranteed to fit within the range of原创 2017-04-21 16:37:03 · 146 阅读 · 0 评论 -
389. Find the Difference
Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling string s and then add one more letter at a random position. Find the letter that was原创 2017-04-25 00:18:22 · 224 阅读 · 0 评论 -
136. Single Number
Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it without using ext原创 2017-04-24 23:28:53 · 126 阅读 · 0 评论