Interview Experience - Freshworks
Staff Software Engineer (IC2)Freshworks SSE Interview (Virtual)
Software EngineerFreshworks Interview Experience - Lead Software Engineer- BackEnd
Lead Software Engineer- BackEndFreshworks | Lead
LeadFreshWorks - SSE | Bangalore | June 2022 | Reject
SDE IISummary
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.
Summary
I interviewed for a Software Engineer role at Freshworks, which involved three rounds: Data Structures & Algorithms, System Design, and a Managerial round. I am currently awaiting the final results.
Full Experience
Round 1: Data Structures & Algorithms
This round was taken by a lead software engineer and focused mainly on DSA. I was asked about my current work and to provide an example for meta-information of a report, as my team deals with reporting.
- Given a set of intervals representing meeting start and end times, I had to determine if a person could attend all meetings. I was then asked to refactor my code, specifically to decrease the number of lines by moving my custom comparator into lambda expressions.
- I was asked to find the maximum subarray sum.
Round 2: System Design
A week later, I had the System Design round with another lead software engineer. This round included some questions based on my current team and how I spend a day at my company.
- I was asked to explain how Authentication and Authorization work.
- The interviewer asked about the difference between PATCH and PUT HTTP methods.
- We discussed sharding: what it is, its usefulness, the 'celebrity problem,' and how to handle changes in the number of servers.
- I had to differentiate between partitioning and sharding.
- The discussion moved to indexing: how it helps in query optimization and its internal workings.
- I was asked if I review PRs and how I provide review comments to colleagues.
- The interviewer presented a scenario of facing a 504 gateway timeout and asked about potential causes, troubleshooting steps, and solutions.
- I was asked to design a high-level architecture for a WhatsApp-like chat system. I wasn't thoroughly prepared for system design, but I talked about websockets and message queues for notifications. He then asked me to look deeper into how websockets work.
Round 3: Managerial Round
Another week later, I had the managerial round with a staff engineer. We discussed query optimizations, why Redshift was chosen over PostgreSQL in my current team's architecture, and a shard migration tool I had worked on.
- The core question was to design a web scraper given a start URL and a level 'n' until which URLs need to be scraped, returning a list of all scraped URLs. I initially proposed a simple HLD where requests are processed synchronously by hitting URLs, downloading data, and processing recursively. However, the interviewer was not satisfied, pointing out its limitations for very large depths (e.g., billions). I then suggested using a Message Queue with client requests as producers and worker threads as subscribers to process results asynchronously. For responses, I thought of using a storage like Amazon S3, providing pre-signed URLs to the client's email. When asked about status updates without email, I suggested a UI logs page to show 'Queued / IN_PROGRESS / SUCCESS / FAILED' statuses. He then presented a follow-up: what if a worker thread processing 1 million requests crashes after processing 0.5 million? I explained that we could run NFRs to determine a threshold level for crashes, use that threshold to set breakpoints or checkpoints to store partial results, and maintain meta-information about the request. If a failure occurs, we would resume processing from the last successful checkpoint.
Interview Questions (11)
Given a list of meeting time intervals [start, end], determine if a person could attend all meetings. Each meeting is a closed interval [start, end].
Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum.
Explain the fundamental concepts and mechanisms of authentication and authorization in a system.
Differentiate between HTTP PATCH and PUT methods, including their use cases and idempotency.
Explain what sharding is, its utility, and discuss the 'celebrity problem' in the context of sharding. How do you handle changes in the number of servers (e.g., using consistent hashing)?
Explain the concept of partitioning and how it differs from sharding in database design.
Describe what database indexing is, how it aids in query optimization, and its internal working mechanisms.
Describe your experience with code reviews and how you provide constructive feedback to colleagues.
Discuss potential causes of a 504 Gateway Timeout error, how to diagnose the issue, and common solutions.
Design a high-level architecture for a real-time chat system similar to WhatsApp.
Design a web scraper that takes a start URL and a depth n, and returns a list of URLs scrapped up to that level. Discuss handling large depths (e.g., billions of levels), ensuring fault tolerance, and providing status updates to users without email.
Preparation Tips
My learning from this experience was that I wasn't adequately prepared for system design interviews, as I hadn't gone through any system design resources. The interviewer implied that the interview itself wasn't inherently tough, and I would have performed better with proper system design preparation.
Summary
I interviewed for a Lead Software Engineer- BackEnd role at Freshworks, successfully navigating five rounds, including technical DSA, system design, bar raiser, hiring manager, and cultural fit, ultimately receiving an offer.
Full Experience
My interview journey at Freshworks for a Lead Software Engineer- BackEnd position was thorough, consisting of five distinct rounds.
Round 1: Technical Interview
The first interviewer was very friendly. We started with a discussion about my previous experience and projects. Following this, we touched upon a few system design concepts. For the Data Structures and Algorithms part, two questions were asked. One was a relatively easy problem, and the other was a classic LRU cache design and implementation.
Round 2: System Design
This round again began with a deep dive into my past experiences and project discussions. The core task was to design a social media platform similar to Facebook. We had an extensive discussion covering Functional Requirements (FR), Non-Functional Requirements (NFR), database design choices, and API creations. The interviewer thoroughly explored various concepts and we discussed the trade-offs for each proposed approach.
Round 3: Bar Raiser Round
The interviewer in this round was also friendly. They inquired about my existing projects and their High-Level Design (HLD), prompting discussions on potential improvements. I was then given a specific scenario for which I had to design a database, discuss the trade-offs of my design choices, and write the necessary SQL queries. Another DSA question followed, which was a variation of the famous 'Buy and Sell Stocks' problem from LeetCode. Additionally, I faced questions related to multi-threading and Spring Boot.
Round 4: Hiring Manager Round
This was a relatively casual discussion, with not much focus on deep technical aspects.
Round 5: Cultural Fit Round
The final round focused on cultural fit. I was advised to be well-prepared for this round, as many candidates are reportedly rejected at this stage. Overall, the interview process went well for me, and I was fortunate enough to receive an offer from Freshworks.
Interview Questions (4)
Design and implement a Least Recently Used (LRU) cache.
Design a social media platform similar to Facebook. This involved discussing functional and non-functional requirements, database schema design, API creation, and analyzing trade-offs for various architectural approaches.
Given a specific scenario, design the appropriate database schema, discuss the trade-offs of the design choices made, and write the required SQL queries.
A variation of the classic 'Buy and Sell Stocks' LeetCode problem was presented.
Preparation Tips
My preparation involved a focused study on Data Structures & Algorithms, comprehensive system design concepts, and behavioral interview questions. For the cultural fit round, I ensured I was thoroughly prepared, as it was highlighted as a critical elimination stage where many candidates face rejection.
Summary
I recently interviewed for a Lead position at Freshworks, navigating through a comprehensive process that included coding, low-level design, high-level design, and a hiring manager round. I was asked to implement specific algorithms and design system components like a Rate Limiter and a Cache System.
Full Experience
My interview journey for the Lead role at Freshworks comprised five distinct rounds. The first round was a coding assessment where I tackled two questions, one involving array manipulation and another focused on implementing a rate limiter. Following this, I progressed to a Low-Level Design (LLD) round. The third round was a 'Bar Raiser' discussion, which centered around designing a Cache System. After that, I participated in a High-Level Design (HLD) round, and my final interaction was with the Hiring Manager.
Interview Questions (3)
Given an array of numbers, arrange them such that odd numbers are placed in odd positions and even numbers are placed in even positions. (The author noted that this was not the exact question but had similar logic).
Implement a rate limiter. This question was part of the coding round, implying a focus on its practical implementation.
Design a Cache System. This was discussed during the Bar Raiser round, implying a deep dive into its architecture, algorithms, and trade-offs.
Summary
I interviewed for an SSE role at FreshWorks in Bangalore, consisting of three comprehensive rounds: a coding round, a system design round, and a bar raiser round. Despite positive feedback in the initial two rounds, I was ultimately rejected after the final bar raiser round.
Full Experience
Background
I applied for an SSE position at FreshWorks in Bangalore. I currently work at a product-based fintech company and have 4.9 years of experience, having graduated from a Tier-3 college.
Round 1: Technical (1 hour)
This was a coding round that began with my brief introduction and a discussion about the projects I had worked on. I was asked two coding questions:
- A rephrased version of Two Sum: Given prices of N items and X amount of money, I needed to find if I could buy exactly two items that fully utilize the given money.
- A variation of the Coin Change problem (specifically Coin Change 2): Given an unlimited supply of coins with values 1, 2, and 3, and a target sum, I had to find the number of ways to make the sum, focusing on permutations. For example, for sum = 4, the output should be 7, with ways like [1,1,1,1], [1,1,2], [1,2,1], [2,1,1], [2,2],[3,1],[1,3].
I was able to successfully solve both questions, and the feedback from this round was positive.
Round 2: System Design (1 hour 30 minutes)
This round focused on system design, but also included some general technical questions. It started with a discussion about my roles and responsibilities at my current company. I was also asked to explain three complex technical issues I had worked on. The system design questions included:
- Designing a system similar to RedBus, specifically limiting the discussion to Search and Seat Booking functionality. We discussed high-level design, API design, database design, and handling race conditions during seat booking.
- Designing the trending page of a video platform like YouTube.
- How to prevent DDoS attacks.
- Steps to take if all requests to an endpoint are giving errors.
- How to identify the root cause when only some requests are intermittently erroring out.
I received positive feedback for this round as well.
Round 3: Bar Raiser Round (1 Hour 30 Minutes)
This round involved discussions on various technical aspects, mostly open-ended questions where the interviewer was interested in my thought process and problem-solving approach. Some of the questions I remember were:
- Implementing connection pooling.
- A detailed discussion on the TLS layer.
- Discussion on Spring Boot's advantages and the internal implementation of some Spring annotations.
- How metrics are sent from an application.
While I answered the questions, the interviewer was not entirely satisfied with some of my responses. I did not hear back from HR after this round, and based on the interviewer's feedback at the end, I understood that I would likely be rejected.
Interview Questions (11)
Design a System like RedBus. The discussion was limited to designing Search and Seat Booking functionality. High level design along with API and Database design was discussed. Handling race conditions during seat booking was also discussed.
Design the trending page of a Video Platform like YouTube.
How do you prevent DDoS attack.
All request of an end point is giving error. Tell the different stpes you will take to handle it.
Only some request are erroring out intermittently, How you will identify the root cause.
Implementing connection poooling.
Discussion on TLS layer
Discussion on Spring boot advantages and internal implementation of some of the spring annotations.
How metrices are sent from an application.