摘要: 题目 Write a function that takes an unsigned integer and returns the number of '1' bits it has (also known as the Hamming weight). Example: Input: 11 Ou 阅读全文
posted @ 2018-10-11 11:08 shinjia 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 题目 Reverse bits of a given 32 bits unsigned integer. Example: Input: 43261596 Output: 964176192 Explanation: 43261596 represented in binary as 0000001 阅读全文
posted @ 2018-10-11 10:57 shinjia 阅读(82) 评论(0) 推荐(0) 编辑
摘要: 题目 Given an array, rotate the array to the right by k steps, where k is non negative. Example 1: Input: [1,2,3,4,5,6,7] and k = 3 Output: [5,6,7,1,2,3 阅读全文
posted @ 2018-10-11 10:00 shinjia 阅读(110) 评论(0) 推荐(0) 编辑