3 ms·
It's useful when you want to find the next free slot in some contiguous store. Normally you'd use ctz, but sometimes you only want 1<<ctz. An example is n-queen
by Veedrac 8y ago
It's useful when you want to find the next free slot in some contiguous store. Normally you'd use ctz, but sometimes you only want 1<<ctz. An example is n-queens, eg.
https://codereview.stackexchange.com/questions/75517/n-queens-brute-force-bit-by-bit https://codereview.stackexchange.com/questions/75517/n-queen...