Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I used this structure (although I knew it by totally different name) a lot in time constrained contests, the code is very short and easy to implement.

Also:

  idx -= (1 << ctz(idx));
I used to write this as:

  idx -= idx&-idx;


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: