Reversing an n-bit number in log n time
hackernoon.com