_Muhammad's blog

By _Muhammad, history, 15 months ago, In English,
bitset < n > b1, b2;
b1 |= b2;

Is the complexity of above code O(n)? Or it works in O(1).

 
 
 
 
  • Vote: I like it
  • -10
  • Vote: I do not like it

»
15 months ago, # |
  Vote: I like it +6 Vote: I do not like it

It works in approximately O(n / 64), but your n is a constant, so it works in O(1) :D