随笔分类 - bit
摘要:Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and r
阅读全文
摘要:Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), retur
阅读全文
摘要:Divide two integers without using multiplication, division and mod operator. If it is overflow, return MAX_INT. 1. nagitive 2. overflow Another exampl
阅读全文
摘要:Given an integer, write an algorithm to convert it to hexadecimal. For negative integer, two’s complementmethod is used. Note: Example 1: Example 2:
阅读全文
摘要:The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total num
阅读全文

浙公网安备 33010602011771号