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

Method BitVector

Java/CtCILibrary/CtCILibrary/BitVector.java:8–15  ·  view source on GitHub ↗
(int length)

Source from the content-addressed store, hash-verified

6 private int[] vector;
7
8 public BitVector(int length) {
9 this.length = length;
10 if (length % DATA_SIZE == 0) {
11 vector = new int[length / DATA_SIZE];
12 } else {
13 vector = new int[length / DATA_SIZE + 1];
14 }
15 }
16
17 public int length() {
18 return length;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected