Round 1
Questions: You are given a stream of integer intervals and what data structures can be used to store them. There are two operations:
storeInterval(int x, int y)
- given interval [x,y] store it in some data structure.findNumber(int x)
bool - given a number x check if it exists in already stored intervals or not.
We are supposed to write the two functions in optimal time (Interviewer didn't say about what optimal means even when I tried to clarify).
Candidate's Approach
No approach provided.
Interviewer's Feedback
No feedback provided.