in reply to Re^2: Most Significant Set Bit
in thread Most Significant Set Bit
Good point on the calculation of log not being O(1).
How do you do a binary search on '0111110100111001011101010000111101000100111011000000000000000011'? I'm not quite sure what is meant by doing a binary search on the bits. What does the comparator look like? When I suggested that the binary search must be on the integer range, it was because I couldn't envision how a binary search would be applied to efficiently discover the first non-zero bit in a bit field directly. I could see it working fairly well on an integer range, though.
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Most Significant Set Bit
by NERDVANA (Priest) on Mar 22, 2024 at 21:35 UTC |