Software Engineer • Mid-Level
Software Engineer • Mid-Level
High QualityInterview Summary
The Applied Intuition technical screen asked a geometry-heavy variation of interval merging. Each input segment was represented by at least two 2D points, and the task was to merge segments that geometrically overlap while preserving all of the points belonging to the merged segment.
The basic idea sounded similar to Merge Intervals, but the 2D representation introduced considerably more edge cases. In particular, the implementation needed to reason correctly about vertical segments and could not assume that the order of the supplied points directly identified the geometric start and end of a segment.
Interview Details
Coding — Merge Overlapping 2D Segments
The function received a structure conceptually similar to:
merge(vector<vector<pair<double, double>>> segments)
Each inner list represented one line segment and contained at least two points:
[(x1, y1), (x2, y2), ...]
If multiple segments overlap geometrically, they should be combined into one resulting segment containing the points from all of those overlapping inputs. Segments that do not
Unlock Full Details
Create a free account to unlock this interview experience report.