LeetCode Question · Dec 2023 · Los Angeles

Google | Onsite | Insert and query ranges

16 upvotes 2,064 views 15 replies

Question Details

Write a class that does the following: 1. insert range 2. query for a point Example: insert(2,3) insert(9,15) query(0) -> false query(3) -> true Note: ranges can be overlapping Solution class RangeModule { private TreeMap<Integer, Integer> map; publi…

Full Details

🔒

Unlock full leaked content

Full insider details, leaked discussions, and candidate experiences.

Get Premium →

Topics

Sql