← Microsoft questions

Remove middle collinear points from 2D coordinate Linked List

Filed under Microsoft

Given a linked list where each node contains 2D coordinates representing horizontal or vertical line segments, remove all intermediate collinear points that lie on the same straight line segment.

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.