Freshworks | Interview (1st Round) | Bengaluru | Data Scientist

freshworks logo
freshworks
Data ScientistBengaluru3.5 years
June 22, 20256 reads

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:

  1. What is a reranker?
  2. Difference between Bi-Encoder and Cross-Encoder?
  3. How is BERT different from GPT?
  4. What are activation functions used for?
  5. 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)

Q1
Simulate a Two-Die Casino Game
Data Structures & Algorithms

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
Data Structures & Algorithms

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
Q3
What is a reranker?
Other

What is a reranker?

Q4
Difference between Bi-Encoder and Cross-Encoder?
Other

Difference between Bi-Encoder and Cross-Encoder?

Q5
How is BERT different from GPT?
Other

How is BERT different from GPT?

Q6
What are activation functions used for?
Other

What are activation functions used for?

Q7
What is regularization and why is it important?
Other

What is regularization and why is it important?

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!