Google L5 Screening Interview Question

Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2025-05-21Added By Anonymous
Source: Link

Company: Google
Role: L5
Interview Stage: Phone Screen
Location: unknown
Year: unknown

Original Post Content:

Implement a class that acts as a union of ranges.
The class should allow to:
- Insert ranges into the class.
- Query the class to check if a particular point is in any of the inserted ranges.

Example:
Ranges Inserted:
2-5
9-13

Points Queried:
0 -> False
2 -> True
10 -> True

Comments