Interview Experience - Freshworks
Summary
I interviewed for the Staff Software Engineer (IC2) role at Freshworks, which involved multiple rounds covering Data Structures and Algorithms, System Design, and behavioral questions. The process included challenging technical problems and deep dives into my project experience, with helpful interviewers guiding discussions.
Full Experience
Round 1: Data Structures & Algorithms
This round focused on Data Structures and Algorithms. I was asked to find the nearest smaller element to the left, which I solved by discussing both a brute-force O(N2) approach and an optimized O(N) solution using stacks. The second problem involved reversing the first K elements of an array, which I efficiently solved using a two-pointer approach with in-place swaps, achieving O(K) complexity. Throughout the round, I made sure to think out loud, consider all base cases and constraints, and perform dry runs.
Round 2: Design + Data Structures & Algorithms
The second round began with my introduction and questions about my current project's architecture. For the DSA part, I tackled the LeetCode problem 'Minimum number of days to disconnect island'. This was a very tough question, and the interviewer was helpful in guiding me through the approach. We then transitioned into a design discussion on Rate Limiting, a topic I had experience with, having implemented it using Redis and Lua. There were also several general questions on technologies like Spring, Java, Kafka, API servlets, and web servers.
Round 3: High-Level Design (HLD) / Low-Level Design (LLD)
This round also started with an introduction and questions about my project architecture. I elaborated on my three major contributions, including how I incorporated AI. Specific technical questions included how I managed latency to a PostgreSQL database (I explained connection pooling) and how I achieved stickiness and high availability (discussing consistent hashing). The main design challenge was to design and implement an application for URL scrapping, where a client provides a source URL and a depth, and the system needs to return a list of URLs up to that depth, with a potential max depth of 100K. I focused on taking proper functional and non-functional requirements and designing the APIs. Initially, I started thinking of a backtracking approach, mistaking it for a DSA problem, but the interviewer was very friendly and helped me with all the questions I had for the design.
Round 4: Hiring Manager
The final round was with the Hiring Manager, focusing on my previous experience and general behavioral questions.
Interview Questions (8)
Given an array, find the nearest smaller element to the left for each element. Discuss brute force O(N^2) and stack-based O(N) approaches.
Given an array and an integer k, reverse the first k elements of the array in-place.
Design a Rate Limiting system. I discussed an implementation using Redis and Lua scripts based on my previous project experience.
Discuss three major contributions from your previous roles and questions related to your current project's architecture, including the usage of AI.
How did you manage latency when interacting with a PostgreSQL database? (e.g., connection pooling)
How did you achieve stickiness and high availability in your systems? (e.g., consistent hashing)
Design and implement an application for URL scrapping. The client shares a source URL and a depth, and the application needs to return a list of URLs discovered up to that depth. The maximum depth can be around 100K. Focus on gathering Functional Requirements (FR) and Non-Functional Requirements (NFR), and API designing.