Comment on Algo Deck: an open-source collection of 200 cards on algorithmsComments−gwilliams6yboolean checkExactlyOneBitSet(int num) {return (num & (num - 1)) == 0;}That looks like it'll fail when num == 0. I think it should be: return num && ((num & (num - 1)) == 0);−anentropic6ymaybe posting a github issue would be helpful
Comments
boolean checkExactlyOneBitSet(int num) {
return (num & (num - 1)) == 0;
}
That looks like it'll fail when num == 0. I think it should be:
maybe posting a github issue would be helpful