MCPcopy Create free account
hub / github.com/careercup/CtCI-6th-Edition / print

Method print

Java/CtCILibrary/CtCILibrary/BitVector.java:32–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30 }
31
32 public void print() {
33 for (int k : vector) {
34 for (int i = 0; i < DATA_SIZE; i++) {
35 if ((k >> i & 1) == 1) {
36 System.out.print(1);
37 } else {
38 System.out.print(0);
39 }
40 }
41 System.out.println();
42 }
43 }
44
45 public void set(int i, boolean flag) {
46 if (i >= 0 && i < length) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected