Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Algo Deck: an open-source collection of 200 cards on algorithms.
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);
return (num & (num - 1)) == 0;
}
That looks like it'll fail when num == 0. I think it should be: