摘要: 题目: Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight). For example, the 32- 阅读全文
posted @ 2017-02-22 23:26 panini 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 题目: Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), r 阅读全文
posted @ 2017-02-22 05:28 panini 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 题目: Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4]. 阅读全文
posted @ 2017-02-22 03:11 panini 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 题目: Given an integer n, return the number of trailing zeroes in n!. Note: Your solution should be in logarithmic time complexity. 链接: http://leetcode. 阅读全文
posted @ 2017-02-22 02:23 panini 阅读(127) 评论(0) 推荐(0) 编辑