Freshworks | Staff Software engineer| Interview Experience
Summary
I interviewed for a Staff Software Engineer role at Freshworks, cleared the DSA round with LFU Cache and Product of Array Except Self, but was rejected after the frontend round.
Full Experience
Round 1 - DSA
1️⃣ LFU Cache
Started with a basic HashMap + Doubly Linked List approach and then optimized it to achieve O(1) operations.
Optimized design:
key → Node
frequency → Doubly Linked List
Discussed:
get()/put()- Frequency updates
- Moving nodes between frequency lists
minFrequency- LFU + LRU eviction
- O(1) time complexity
2️⃣ Product of Array Except Self
Initially considered a brute-force O(n²) solution, then optimized using prefix and suffix products.
Time: O(n)
Space: O(n)
Verdict: Selected
Round 2 - Frontend
This round was fully focused on JavaScript and frontend fundamentals.
Started with basic conceptual questions and then went deeper with follow-ups.
Topics included:
varvsletvsconst- Scope and hoiding
- Closures
- JavaScript execution behavior
- Core frontend concepts
The questions initially seemed like basic conceptual questions, but the interviewer went deep into each topic.
I was primarily prepared for Java, backend, distributed systems, and system design, so I wasn't very comfortable with the deeper frontend discussion.
Verdict: Rejected
Key Takeaway
For a full-stack Staff Engineer role, prepare deeply for both backend and frontend, even if your primary experience is backend-heavy.
Interview Questions (2)
LFU Cache
Implemented an LFU Cache solution. Started with a basic HashMap + Doubly Linked List approach and then optimized it to achieve O(1) operations. Optimized design uses a mapping from key to node and frequency to a doubly linked list. Discussed get/put, frequency updates, moving nodes between frequency lists, minFrequency, LFU+LRU eviction, and O(1) time complexity.
Product of Array Except Self
Implemented the Product of Array Except Self problem. Initially considered a brute-force O(n²) solution, then optimized using prefix and suffix products to achieve O(n) time and O(n) space.
Preparation Tips
I primarily prepared for Java, backend, distributed systems, and system design, but was not comfortable with deep frontend topics.