Lee Hsien Loong’s Sudoku solver, không biết có ai bơm cho ổng hay không mà ổn code gớm qúa
Đạt còn không biết cái trick này cho tới khi ổng nói
As several of you noted, (x & –x) returns the least significant ‘1’ bit of x, i.e. the highest power of two that divides x. This assumes two’s complement notation for negative numbers, as some of you also pointed out. e.g. if x=12 (binary 1100), then (x & -x) = 4 (binary 100). I didn’t invent this; it is an old programming trick.