首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏给永远比拿愉快

    Leetcode: Reverse Bits

    题目: Reverse bits of a given 32 bits unsigned integer.

    58010发布于 2019-01-22
  • 来自专栏SnailTyan

    Counting Bits

    1. Description 2. Solution Version 1 class Solution { public: vector<int> countBits(int num) {

    31810发布于 2019-05-25
  • 来自专栏Reck Zhang

    LeetCode 0338 - Counting Bits

    Counting Bits Desicription Given a non negative integer number num.

    21420发布于 2021-08-11
  • 来自专栏计算机视觉与深度学习基础

    Leetcode 190 Reverse Bits

    Reverse bits of a given 32 bits unsigned integer.

    733100发布于 2018-01-12
  • 来自专栏算法修养

    UESTC 491 Tricks in Bits

    Tricks in Bits Time Limit: 1000MS Memory Limit: 65535KB 64bit IO Format: %lld & %llu Submit Status

    67540发布于 2018-04-26
  • 来自专栏赵俊的Java专栏

    LeetCode 338 Counting Bits

    示例 1: 输入: 2 输出: [0,1,1] 示例 2: 输入: 5 输出: [0,1,1,2,1,2] 解法 此题是 LeetCode 191 Number of 1 Bits 的拓展版, 可以利用那道题的两种算法

    44920发布于 2019-12-29
  • 来自专栏安恒网络空间安全讲武堂

    学习分享 | Flipped Ciphertext Bits

    0x00前言 这次蓝盾杯线上赛遇到了一题类似于NJCTF的CBC翻转攻击的题目,不过题目被改简单了,省去了最开始的Padding Oracle攻击部分,直接给出了初始字符串。 0x01正文 源码如下:

    1.2K80发布于 2018-02-06
  • 来自专栏Bingo的深度学习杂货店

    Q190 Reverse Bits

    Reverse bits of a given 32 bits unsigned integer.

    71350发布于 2018-04-25
  • 来自专栏chenjx85的技术专栏

    leetcode-190-Reverse Bits

    题目描述: Reverse bits of a given 32 bits unsigned integer.

    66550发布于 2018-05-21
  • 来自专栏赵俊的Java专栏

    LeetCode 191 Number of 1 Bits

    num >>= 1, 以此类推, 直到移位 32 次. public class Solution { public int hammingWeight(int n) { int bits = 0) { bits++; } n >>= 1; } return bits;

    46020发布于 2019-12-29
  • 来自专栏Bingo的深度学习杂货店

    Counting Bits

    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 return them as an array.

    53120发布于 2019-06-13
  • 来自专栏全栈程序员必看

    CodeForces 484A Bits

    10000询价 每次查询输入L和R(10^18) 在区间的二进制输出指示1大多数数字 1个数同样输出最小的

    34910编辑于 2022-07-06
  • 来自专栏流川疯编写程序的艺术

    leetcode 190 Reverse Bits

    Reverse bits of a given 32 bits unsigned integer.

    48220发布于 2019-01-18
  • 来自专栏Reck Zhang

    LeetCode 0190 - Reverse Bits

    Reverse Bits Desicription Reverse bits of a given 32 bits unsigned integer.

    32410发布于 2021-08-11
  • 来自专栏SnailTyan

    Reverse Bits

    n >>= 1; } return result; } }; Reference https://leetcode.com/problems/reverse-bits

    33310发布于 2019-05-25
  • 来自专栏Bingo的深度学习杂货店

    Q191 Number of 1 Bits

    Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known

    57060发布于 2018-04-25
  • 来自专栏LeetCode

    Number of 1 Bits

    191.Number of 1 Bits Write a function that takes an unsigned integer and returns the number of '1' bits

    38800发布于 2018-11-05
  • 来自专栏月亮与二进制

    Counting Bits

    把0~7的二进制表示法的数字列出来,数其中的1的个数,找到一个规律,0对应的数是0,1、2对应的是1个1。往上走只用计算不断除以2一直除到1后,存在余数为1的次数,加上最后的1,就是该数二进制表示法中1的个数。

    42020发布于 2021-11-23
  • 来自专栏Reck Zhang

    LeetCode 0191 - Number of 1 Bits

    Number of 1 Bits Desicription Write a function that takes an unsigned integer and returns the number of ‘1’ bits it has (also known as the Hamming weight).

    24110发布于 2021-08-11
  • 来自专栏计算机视觉与深度学习基础

    Leetcode 191 Number of 1 Bits

    into those 2 bits n = (n & 0x33333333) + (n >> 2 & 0x33333333); // put count of each 4 bits those 8 bits n = (n & 0x00FF00FF) + (n >> 8 & 0x00FF00FF); // put count of each 16 bits into those 4 bits n = (n + (n >> 4)) & 0x0F0F0F0F; //put count of each 8 bits into those 8 bits n += n >> 8; // put count of each 16 bits into those 8 bits n += n >> 16; // put count of each 32 bits those 4 bits n = (n + (n >> 4)) & 0x0F0F0F0F; // put count of each 8 bits into those 8 bits

    70050发布于 2018-01-12
领券