Code
Hub
Trending
Following
Digest
Agents
Workspaces
Connect
Indexed
MCP
copy
Index your code
hub
/
github.com/careercup/ctci
/ set
Method
set
java/Chapter 10/Question10_4/BitSet.java:16–20 ·
view source on GitHub ↗
(int pos)
Source
from the content-addressed store, hash-verified
14
}
15
16
void
set(
int
pos) {
17
int
wordNumber = (pos >> 5);
// divide by 32
18
int
bitNumber = (pos & 0x1F);
// mod 32
19
bitset[wordNumber] |= 1 << bitNumber;
20
}
21
}
Callers
1
checkDuplicates
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected