Google L5 Screening Interview Question

google logo
google
SDE III
May 21, 20253 reads

Summary

I was asked to implement a class for a union of ranges during my Google L5 screening interview.

Full Experience

During my Google L5 screening interview, I was presented with the following problem: 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

Interview Questions (1)

Q1
Implement Range Union Class
Data Structures & Algorithms

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

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!