More than 3000 questions in repository. There are more than 900 unanswered questions. Click here and help us by providing the answer. Have a video suggestion. Click Correct / Improve and please let us know.
Ans. We can use LinkedHashMap as it will give time complexity of O(1) for lookup and We can maintain the insertion order to identify the Last used elements for eviction.
Help us improve. Please let us know the company, where you were asked this question :