Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/careercup/ctci
/ clearBit
Method
clearBit
java/Chapter 5/Sample_Code/Sample_Code.java:15–18 ·
view source on GitHub ↗
(int num, int i)
Source
from the content-addressed store, hash-verified
13
}
14
15
public
static
int
clearBit(
int
num,
int
i) {
16
int
mask = ~(1 << i);
17
return
num & mask;
18
}
19
20
public
static
int
updateBit(
int
num,
int
i,
int
value) {
21
int
mask = ~(1 << i);
Callers
1
main
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected