javascript-algorithms icon indicating copy to clipboard operation
javascript-algorithms copied to clipboard

Bit Reversal missing?

Open worldoptimizer opened this issue 3 years ago • 1 comments

Something along the lines of:

function bitReverse(num){
        var result = 0;
        for (var i = 0; i < 8; i++) {
	        result = result * 2 + (num % 2);
	        num = Math.floor(num / 2);
        }
       return result;
}

var bitReverseLookup = function() {
	var lookup=[];
	for(var n=0; n<256; n++) {
		lookup[n] = bitReverse(n);
	}
	return lookup;
}();

worldoptimizer avatar Apr 17 '21 16:04 worldoptimizer

Hi i am a fresher looking for some opensource contribution can u help me out i want to contribute to your project and can u assign me this issue:)

Krish-bhardwaj avatar Jan 22 '22 05:01 Krish-bhardwaj