Leetcode
z63as
这个作者很懒,什么都没留下…
展开
-
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, y < 23...原创 2017-06-05 10:48:05 · 105 阅读 · 0 评论 -
203. Remove Linked List Elements
203. Remove Linked List Elements Remove all elements from a linked list of integers that have value val.ExampleGiven: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val = 6Return: 1 -...原创 2017-01-19 11:10:59 · 103 阅读 · 0 评论 -
27. Remove Element
27. Remove ElementGiven an array and a value, remove all instances of that value in place and return the new length.Do not allocate extra space for another array, you must do this in place with c...原创 2017-01-19 11:17:05 · 113 阅读 · 0 评论 -
26. Remove Duplicates from Sorted Array
26. Remove Duplicates from Sorted ArrayGiven a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for anoth...原创 2017-01-19 11:18:23 · 119 阅读 · 0 评论 -
1. Two Sum
1. Two SumGiven an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution.Example: Gi...原创 2017-01-19 11:21:14 · 124 阅读 · 0 评论 -
237. Delete Node in a Linked List
237. Delete Node in a Linked ListWrite 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 ...原创 2017-01-19 16:05:54 · 152 阅读 · 0 评论