开发者

How to find all "1" bits in a unsigned char bitmapRep[8192]?

开发者 https://www.devze.com 2023-02-07 05:55 出处:网络
Given a unsigned char bitmapRep[8192], how to efficiently find out all \"开发者_运维百科1\" bits\' positions? Thanks.What do you mean by \"find\"?

Given a unsigned char bitmapRep[8192], how to efficiently find out all "开发者_运维百科1" bits' positions? Thanks.


What do you mean by "find"?

This may seem like a smart-ass answer, but I'm perfectly serious: you already have found them. There's a perfect map describing exactly where all the 1 bits are found, and it has a bit set in the corresponding positions.


Homework?

hint - Lookup table for each byte

0

精彩评论

暂无评论...
验证码 换一张
取 消