subash23's blog

By subash23, history, 7 years ago, In English

Can anyone suggest me a way to find the previous set bit or next set bit using Bitset STL in C++? I have seen submissions in Java where these functions are pre-defined. Any way to do the same in C++?

  • Vote: I like it
  • +5
  • Vote: I do not like it

»
7 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by subash23 (previous revision, new revision, compare).

»
7 years ago, hide # |
 
Vote: I like it +3 Vote: I do not like it
»
7 years ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

Implement it. Bitset problems are often time-critical enough that it's better to write something that works fast for a specific case.