daily pastebin goal
0%
SHARE
TWEET

Untitled

a guest Jul 10th, 2011 198 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int MAX = (1 << n);
  2. for (int i = 0, revi = 0; i < MAX; ++i) {
  3.   int bit = (MAX >> 1);
  4.   for (; revi & bit; bit >>= 1)
  5.     revi ^= bit;
  6.   revi |= bit;
  7.  
  8.   reversed[i] = revi;
  9. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top