interview questions shared by candidates
Given a set of XY pairs I want to create a data structure such that searching, insertion and deletion is extremely fast using the X value. But I also want to be able to find the maximum Y value at any given time. What data structure would you use for this problem? How would you keep track of the maximum Y value? This Y value can also get deleted during the process.