Freshworks | Interview (1st Round) | Bengaluru | Data Scientist
Summary
I interviewed for a Data Scientist role at Freshworks in January 2025. The first round, a technical round, included two coding questions and several ML/NLP theoretical questions; I was able to discuss the approach for one of the coding problems.
Full Experience
Interview Context
I appeared for a Data Scientist role at Freshworks in January 2025. I had 3.5 years of industry experience as a Data Scientist in a mid sized company. The first round was a technical round consisting of two coding questions and a set of ML + NLP theoretical questions.
Below are the questions I was asked:
🔹 Q1: Simulate a Two-Die Casino Game
Problem Statement: You are working for a casino and need to simulate a two dice game. Write a function that simulates the sum of rolling two six-sided dice, but you are only allowed to use one random function.
Constraints: • Use only one call to a uniform random function like random.randint(1, 6). • Return values should range from 2 to 12, with correct probability distribution.
Follow up: Avoid multiple calls to random function
🔹 Q2: Maximum Minimum Thickness of Slab
Problem Statement: You’re given an m x n matrix, where each cell holds the thickness of a slab. You need to move from the top-left cell (0, 0) to the bottom-right cell (m-1, n-1), moving only right or down.
The goal is to maximize the minimum thickness encountered along the path.
Input:
[
[5, 1, 7],
[4, 8, 5],
[2, 3, 9]
]
Output: 4
Explanation: Path = [5 → 4 → 8 → 5 → 9], minimum along path = 4
🔹 Recommended Practice (as per HR):
• Number of Islands (Graph traversal / DFS-BFS problem): https://leetcode.com/problems/number-of-islands/description/
🔹 ML / NLP Theory Questions:
- What is a reranker?
- Difference between Bi-Encoder and Cross-Encoder?
- How is BERT different from GPT?
- What are activation functions used for?
- What is regularization and why is it important?
Update:
Second Coding question was not very easy, I could discuss the approach only.
Interview Questions (7)
Problem Statement: You are working for a casino and need to simulate a two dice game. Write a function that simulates the sum of rolling two six-sided dice, but you are only allowed to use one random function.
Constraints: • Use only one call to a uniform random function like random.randint(1, 6). • Return values should range from 2 to 12, with correct probability distribution.
Follow up: Avoid multiple calls to random function
Problem Statement: You’re given an m x n matrix, where each cell holds the thickness of a slab. You need to move from the top-left cell (0, 0) to the bottom-right cell (m-1, n-1), moving only right or down.
The goal is to maximize the minimum thickness encountered along the path.
Input:
[
[5, 1, 7],
[4, 8, 5],
[2, 3, 9]
]
Output: 4
Explanation: Path = [5 → 4 → 8 → 5 → 9], minimum along path = 4
What is a reranker?
Difference between Bi-Encoder and Cross-Encoder?
How is BERT different from GPT?
What are activation functions used for?
What is regularization and why is it important?