摘要: Write a function that takes an unsigned integer and return the number of '1' bits it has (also known as the Hamming weight). Example 1: Example 2: Exa 阅读全文
posted @ 2019-06-12 15:39 lpomeloz 阅读(128) 评论(0) 推荐(0) 编辑
摘要: Reverse bits of a given 32 bits unsigned integer. Example 1: Example 2: Note: Note that in some languages such as Java, there is no unsigned integer t 阅读全文
posted @ 2019-06-12 14:44 lpomeloz 阅读(135) 评论(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,4] 阅读全文
posted @ 2019-06-12 11:16 lpomeloz 阅读(160) 评论(0) 推荐(0) 编辑