开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜