trekhleb / trekhleb/javascript-algorithms
Bit Reversal missing?
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 197k
- Forks
- 31k
- PR merge metrics
- No merged PRs in 30d
Description
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;
}();
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no file or test. Search the repository for existing bit-manipulation algorithms and their tests, then compare the requested bit-reversal behavior with nearby conventions. Done means the missing functionality is implemented consistently with the project and its behavior is covered by the relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100