Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/careercup/ctci
/ clearBitsIthrough0
Method
clearBitsIthrough0
java/Chapter 5/Sample_Code/Sample_Code.java:30–33 ·
view source on GitHub ↗
(int num, int i)
Source
from the content-addressed store, hash-verified
28
}
29
30
public
static
int
clearBitsIthrough0(
int
num,
int
i) {
31
int
mask = ~(-1 >>> (31 - i));
32
return
(num & mask);
33
}
34
35
public
static
void
main(String[] args) {
36
Callers
1
main
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected