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

Method computeByteNum

java/Chapter 5/Question5_8/Question.java:6–8  ·  view source on GitHub ↗
(int width, int x, int y)

Source from the content-addressed store, hash-verified

4
5public class Question {
6 public static int computeByteNum(int width, int x, int y) {
7 return (width * y + x) / 8;
8 }
9
10 public static void drawLine(byte[] screen, int width, int x1, int x2, int y) {
11 int start_offset = x1 % 8;

Callers 1

printScreenMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected