MCPcopy Create free account
hub / github.com/careercup/ctci / get

Method get

java/CtCILibrary/CtCILibrary/BitVector.java:21–30  ·  view source on GitHub ↗
(int i)

Source from the content-addressed store, hash-verified

19 }
20
21 public boolean get(int i) {
22 int b = vector[i / DATA_SIZE];
23 int bit_index = i % DATA_SIZE;
24 //00100010
25 if (((b >> bit_index) & 1) == 1) {
26 return true;
27 } else {
28 return false;
29 }
30 }
31
32 public void print() {
33 for (int k : vector) {

Callers 1

printNodeInternalMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected