NVIDIA interview question

Bit reversal algorithm