MCPcopy Index your code
hub / github.com/careercup/ctci / set

Method set

java/Chapter 5/Question5_7/BitInteger.java:26–29  ·  view source on GitHub ↗

Sets k-th most-significant bit.

(int k, int bitValue)

Source from the content-addressed store, hash-verified

24
25 /** Sets k-th most-significant bit. */
26 public void set(int k, int bitValue){
27 if (bitValue == 0 ) bits[k] = false;
28 else bits[k] = true;
29 }
30
31 /** Sets k-th most-significant bit. */
32 public void set(int k, char bitValue){

Callers 4

swapValuesMethod · 0.95
addCardToScoreListMethod · 0.45
shuffleMethod · 0.45
shuffleMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected