摘要: 2017/3/23 15:41:47 Given two arrays, write a function to compute their intersection. Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2]. N 阅读全文
posted @ 2017-03-26 23:59 会飞的胖子 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 2017/3/23 22:23:57 Given an integer (signed 32 bits), write a function to check whether it is a power of 4. Example:Given num = 16, return true. Given 阅读全文
posted @ 2017-03-26 23:59 会飞的胖子 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 2017/3/14 15:23:55 The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integ 阅读全文
posted @ 2017-03-26 23:58 会飞的胖子 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 2017/3/16 22:36:02 Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, t 阅读全文
posted @ 2017-03-26 23:58 会飞的胖子 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 2017/3/14 15:36:44 Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation. N 阅读全文
posted @ 2017-03-26 23:57 会飞的胖子 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 2017/3/15 21:47:04 Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example,"A man, a 阅读全文
posted @ 2017-03-26 23:57 会飞的胖子 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 2017/3/16 20:03:07 Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -. Example:Given a = 1 and b = 2, retu 阅读全文
posted @ 2017-03-26 23:57 会飞的胖子 阅读(145) 评论(0) 推荐(0) 编辑
摘要: Given 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 ex 阅读全文
posted @ 2017-03-26 23:56 会飞的胖子 阅读(304) 评论(0) 推荐(0) 编辑