Refine the following interview question for clarity and conciseness: "Given a monochrome screen represented as a single byte array where each byte holds eight consecutive pixels, and with a width 'w' that is divisible by 8, derive the screen height from the array length. Implement a function to draw a horizontal line from coordinates (xl, y) to (x2, y)
Refine the following interview question for clarity and conciseness: "Given a monochrome screen represented as a single byte array where each byte holds eight consecutive pixels, and with a width 'w' that is divisible by 8, derive the screen height from the array length. Implement a function to draw a horizontal line from coordinates (xl, y) to (x2, y)
Refine the following interview question for clarity and conciseness: "Given a monochrome screen represented as a single byte array where each byte holds eight consecutive pixels, and with a width 'w' that is divisible by 8, derive the screen height from the array length. Implement a function to draw a horizontal line from coordinates (xl, y) to (x2, y)
Refined Interview Question
"Given a byte array representing a monochrome screen, where each byte contains eight consecutive pixels and the width 'w' is divisible by 8, derive the screen height from the length of the array. Implement a function to draw a horizontal line from coordinates (x1, y) to (x2, y)
Question Details
Difficulty
Medium
Medium
Type
Coding
Coding
Companies
Google
Google
Tags
Given a byte array representing a monochrome screen with a width 'w' (divisible by 8)
derive the screen height from the array length. Implement a function to draw a horizontal line from (xl
y) to (x2
y)."
Algorithm
Problem-Solving
Programming
Given a byte array representing a monochrome screen with a width 'w' (divisible by 8)
derive the screen height from the array length. Implement a function to draw a horizontal line from (xl
y) to (x2
y)."
Algorithm
Problem-Solving
Programming
Roles
Software Engineer
Graphics Programmer
Game Developer
Software Engineer
Graphics Programmer
Game Developer