Meta | Phone Screen | Rejected
Anonymous User
939

Question: You are given 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 clarified)

Comments (9)