![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCode
文章平均质量分 57
TanXY_915
不辜负每一天的自己
展开
-
LeetCode——Hamming Distance
Hamming DistanceThe 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. Example:I原创 2017-05-24 21:55:23 · 336 阅读 · 0 评论 -
LeetCode——Minimum Moves to Equal Array Elements
ⅠGiven a non-empty integer array of size n, find the minimum number of moves required to make all array elements equal, where a move is incrementing n - 1 elements by 1.Example:Input: [1,2,3]Output:原创 2017-05-26 00:09:18 · 370 阅读 · 0 评论 -
LeetCode——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 a 32-b原创 2017-05-27 05:31:25 · 302 阅读 · 0 评论 -
LeetCode——141. Linked List Cycle
Given a linked list, determine if it has a cycle in it.Follow up: Can you solve it without using extra space?/** * * Definition for singly-linked list. * class ListNode { * int val; * Li原创 2017-06-28 00:53:42 · 477 阅读 · 0 评论 -
LeetCode——237. Delete Node in a Linked List
Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.Supposed the linked list is 1 -> 2 -> 3 -> 4 and you are given the third node with value 3, t原创 2017-06-28 00:50:40 · 396 阅读 · 0 评论