2019-08-31から1日間の記事一覧
ビット表現祭りその2。 https://leetcode.com/problems/number-of-1-bits/ 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: Input: 00000000000000000000000000…
ビット表現祭り。 https://leetcode.com/problems/reverse-bits/ Reverse bits of a given 32 bits unsigned integer. Example 1: Input: 00000010100101000001111010011100 Output: 00111001011110000010100101000000 Explanation: The input binary string…