← Microsoft questions

Rasterize line on computer screen

Filed under Microsoft

Given two integer coordinates representing pixels on a grid, (x1, y1) and (x2, y2), write an algorithm to determine the set of intermediate pixels that form a continuous line connecting them.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Microsoft questions

Collected from public candidate posts and coding forums. Updated Nov 2026.