Guest User

Untitled

a guest
Jul 10th, 2011
256
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