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

Method printScreen

java/Chapter 5/Question5_8/Question.java:53–62  ·  view source on GitHub ↗
(byte[] screen, int width)

Source from the content-addressed store, hash-verified

51 }
52
53 public static void printScreen(byte[] screen, int width) {
54 int height = screen.length * 8 / width;
55 for (int r = 0; r < height; r++) {
56 for (int c = 0; c < width; c+=8) {
57 byte b = screen[computeByteNum(width, c, r)];
58 printByte(b);
59 }
60 System.out.println("");
61 }
62 }
63
64 public static void main(String[] args) {
65 int width = 8 * 4;

Callers 1

mainMethod · 0.95

Calls 2

computeByteNumMethod · 0.95
printByteMethod · 0.95

Tested by

no test coverage detected