Quick Overview

Compute the union of two sorted, nonoverlapping lists of closed intervals. Merge the two streams in linear time, combining endpoint-touching, duplicate, contained, and cross-list intervals correctly.

Compute the Union of Two Sorted Interval Lists

Company: Google

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Onsite

Overview: Compute the union of two sorted, nonoverlapping lists of closed intervals. Merge the two streams in linear time, combining endpoint-touching, duplicate, contained, and cross-list intervals correctly.

Read the full Google Software Engineer interview experience this question came from

Loading…