Essa empresa é sua?
Implement a data structure that keeps track of 50 integers. How would you build this data structure to check if an element is present, and if the structure is full, remove the oldest element? There are also no duplicates.
Sigiloso
we can use BST for checking if the element is present or not (that is O(logn)), we also need to keep the total count, and about the oldest element(It looks to me like a LRU cache problem)