This question is pertaining to the design involved in building a LRUCache. The complete problem can be found here. Although the solution ends up using a doubly linked list due to best time complexity for adding, deleting and lookup a key value pair, but I was wondering if we could use arrays for the same?
It'll be helpful to think of other data structures such as heaps, binary search trees, heaps as well. Can someone provide their thoughts on the same?