🚀 Interview Experience | Python Backend Role | 2 Rounds + LRU Cache | Rejected Despite Correct Solution 😅
📅 Round 1 (26 June)
The first round was mostly discussion-based.
Topics Covered
- 🏗️ System Design of my current projects
- 🐍 Python fundamentals
- 🤖 AI projects and practical usage
The interviewer spent a good amount of time discussing my architecture decisions and how I had built AI-powered solutions at work.
📅 Round 2 (30 June)
This round focused on:
- 📌 Deep dive into my projects
- 🤖 How I use AI in my day-to-day development workflow
- 💻 1 Coding Question
💻 DSA Question — Implement SmartCache (LRU Cache)
Design a cache with limited capacity.
Implement:
SmartCache(int capacity)get(int key)put(int key, int value)
Requirements
- Return -1 if key doesn't exist.
- Every access makes the key Most Recently Used.
- If cache is full, evict the Least Recently Used (LRU) item.
💡 Expected Approach
Use:
✅ HashMap → O(1) lookup
✅ Doubly Linked List → Maintain usage order
Operations:
-
get()→ Move node to front -
put()- Update existing → Move to front
- If full → Remove tail (LRU)
⏱️ Complexity
get()→ O(1)put()→ O(1)- Space → O(capacity)
🧪 Follow-up
After writing the solution, the interviewer asked me to:
- Run through multiple test cases
- Explain every pointer update
- Justify why both operations remain O(1)
- Discuss edge cases (capacity = 1, updating existing keys, repeated gets)
Everything went smoothly, and the follow-up discussion was positive.
✅ Verdict
❌ Rejected
The feedback was that the role was primarily for a Python Developer.
Although:
- ✅ My approach was correct
- ✅ My Java implementation was correct
- ✅ I cleared the dry run
- ✅ I answered all follow-up questions
...the expectation was to code in Python, while I chose Java.
📚 Takeaway
For language-specific backend roles, always ask the interviewer which programming language they prefer before starting the coding round. A correct solution isn't always enough if the interview is evaluating proficiency in a particular language.
Hopefully this experience helps someone preparing for similar interviews. Good luck! 🚀

