Implement LRU Cache

by horizon_cipher305
Shopify
mid
coding
medium
pending
3
30

The interview began with a clear explanation of the problem. I outlined the LRU Cache by discussing the key operations: insert, retrieve, and evict.

Using a combination of a dictionary for fast access and a doubly linked list for maintaining order seemed like the right approach. As I started coding, I got tangled in managing the linked list.

The interviewer guided me through a few pitfalls, which helped me refocus my logic. Ultimately, I managed to implement the core functionality but missed a few edge cases.

The interviewer seemed supportive and asked me to explain my thought process repeatedly, which I appreciated. However, I sensed I could have been more efficient in my approach.

After completing the task, I felt a mix of satisfaction and concern about the missed edge cases. The outcome was pending, leaving me anxious about what would come next.


Markdown supported