Freshworks interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Freshworks
upvote
share-icon
4 rounds | 8 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 2 months
Topics: Aptitude, Data Structures, Pointers, OOPS, Algorithms, Dynamic Programming.
Tip
Tip

Tip 1 : Start with basic practise and once we are strong with basics, start coding.
Tip 2 : Use and get strong in only one coding language.(preferable Java, C++)
Tip 3 : Do some project which can be useful to explain in HR or intro process and Be strong with OOAD concepts.

Application process
Where: Company Website
Eligibility: Above 6 CGPA
Resume Tip
Resume tip

Tip 1 : List down only the skills which we are perfect at.
Tip 2 : Add projects in 1st page and give a brief intro about the project as description in the resume.
Tip 3 : Add your profiles in the resume.

Interview rounds

01
Round
Medium
Assignment
Duration0.5 month
Interview date21 Nov 2019
Coding problem1

1. Java Question

Write a program that can merge a series of files containing JSON array of Objects
into a single file containing one JSON object.
Example:
Suppose there are 3 files - data1.json, data2.json, data3.json.
Let's say data1.json contains -
{"strikers": [
{ "name": "Alexis Sanchez", "club": "Manchester United" },
{ "name": "Robin van Persie", "club": "Feyenoord" }
] }
data2.json contains -
{"strikers": [
{ "name": "Nicolas Pepe", "club": "Arsenal" }
] }
data3.json contains -
{"strikers": [
{ "name": "Gonzalo Higuain", "club": "Napoli" },
{ "name": "Sunil Chettri", "club": "Bengaluru FC" }
] }
A merge of these 3 files will generate a file with the following data.
merge1.json -
{"strikers": [
{ "name": "Alexis Sanchez", "club": "Manchester United" },
{ "name": "Robin van Persie", "club": "Feyenoord" },
{ "name": "Nicolas Pepe", "club": "Arsenal" },
{ "name": "Gonzalo Higuain", "club": "Napoli" },
{ "name": "Sunil Chettri", "club": "Bengaluru FC" }
] }

Functional requirements:
1. Accept the following parameters as an input –
a. Folder Path: The folder where all the JSON files are stored.
b. Input File Base Name: The common prefix all file names share. In our
example above, this prefix was data.
c. Output File Base Name: The prefix for the merged file name
generated by the merge utility.
d. Max File Size: The maximum file size (in bytes) that each merged file
is allowed to be.

2. The utility will read all files in the Folder Path that begin with the Input File
Base Name, and process them in increasing order of the number added as a
suffix to each file (1,2,3,....,12,13,...).
3. The utility will ensure that the output files are named using the Output File
Base Name as a prefix, and a counter as a suffix.
4. Merged files will never be greater than Max File Size.

5. Each output file will contain a proper JSON array.
6. Bonus points for making the solution generic so any kind of JSON array can
be merged. (e.g.: The root key "strikers" becomes "employees". The objects
in the array carry fields like "name", "id", "designation", etc.)
7. Bonus points for supporting non-English characters.

Non-functional requirements:
1. The algorithmic complexity of the merge will be as small as possible. Please
capture the algorithmic complexity of your solution in the README file.
2. The merged files will be as large as possible, without exceeding Max File
Size.
Languages:
Ideally, we would not restrict you from working on a language of your choice.
However, it would be preferable if you stick with one of these:
• NodeJS
• Java
• Python
• GoLang
• Ruby
• C/C++

Problem approach

Tip 1 : Should satisfy all functional and non functional requirements without miss
Tip 2 : Follow OOPS concepts and the code should be scable and should follow design patterns.
Tip 3 : Add any extra functionality to make your assignment standout of others.

02
Round
Medium
Face to Face
Duration60 minutes
Interview date9 Dec 2019
Coding problem3

First round was completely problem solving.
Initially interviewer went through the resume and asked for self intro(keep self intro short as the aim of the round is problem solving).
Interviewer asked questions on different kind of sorts and asked to implement merge and quick sort(expected to write running code)
Next question is to print all the combinations for a given string.
Atlast interviewer asked few questions on networks(basics).

1. Merge Sort

Easy
15m average time
85% success
0/40
Asked in companies
Media.netHewlett Packard EnterpriseIBM

Given a sequence of numbers ‘ARR’. Your task is to return a sorted sequence of ‘ARR’ in non-descending order with help of the merge sort algorithm.

Example :

Merge Sort Algorithm -

Merge sort is a Divide and Conquer based Algorithm. It divides the input array into two-parts, until the size of the input array is not ‘1’. In the return part, it will merge two sorted arrays a return a whole merged sorted array.

subsequence

The above illustrates shows how merge sort works.
Note :
It is compulsory to use the ‘Merge Sort’ algorithm.
Problem approach

Step 1 : As the question is straight forward, proceeded implementing the algorithm.

Try solving now

2. Quick Sort

Moderate
10m average time
90% success
0/80
Asked in companies
FreshworksSamsung R&D InstituteLenskart

You are given an array of integers. You need to sort the array in ascending order using quick sort.

Quick sort is a divide and conquer algorithm in which we choose a pivot point and partition the array into two parts i.e, left and right. The left part contains the numbers smaller than the pivot element and the right part contains the numbers larger than the pivot element. Then we recursively sort the left and right parts of the array.

Example:

Let the array = [ 4, 2, 1, 5, 3 ]
Let pivot to be the rightmost number.

example

After the 1st level partitioning the array will be { 2, 1, 3, 4, 5 } as 3 was the pivot. After 2nd level partitioning the array will be { 1, 2, 3, 4, 5 } as 1 was the pivot for the left part and 5 was the pivot for the right part. Now our array is sorted and there is no need to divide it again.

Problem approach

Step 1 : As the question is straight forward, proceeded implementing the algorithm.

Try solving now

3. Permutation In String

Easy
0/40
Asked in companies
FreshworksDelhiveryPwC India

You are given two strings named str1 and str2 of length N and M respectively. Find whether string str2 contains one of the permutations of string str1 as its substring. In other words, whether there exists any permutation of string str1 that is a substring of str2.

For Example :

Input: str1 = “ab” , str2 = “aoba”
Output: True
Explanation : Permutations of first-string str1 i.e. “ab” are [ “ab”, “ba” ].
The substrings of str2 i.e. “aoba” are [ “a”, “o”, “b”, “a”, “ao”, “ob”, “ba”, “aob”, “oba”, “aoba” ].
The string “ba” is present in the list of substrings of string str2.
Problem approach

Step 1 : Discussed my algorithms with interviewer.
Step 2 : Once he is satisfied with the mentioned algorithm, we have done a dry run for few examples.
Step 3 : To optimise the algorithm , I have used back tracking technique .

Try solving now
03
Round
Easy
Face to Face
Duration60 minutes
Interview date9 May 2022
Coding problem3

This round the interviewer went through the resume in detail and asked questions on various projects throughout and the technologies used in the projects.
Later he asked questions on application of data structures and few puzzles.

1. System Design

System design of my project

Problem approach

Tip 1 : List the entities used in your project
Tip 2 : Add sequence , use case, activity diagram for few features.
Tip 3 : List the DB schema and the queries used in the project

2. Puzzle Question

If a bowl was thrown from n stored buliding, find the floor which the bowls breaks with minimal iterations.
(Question on binary search applications )

Problem approach

Tip 1 : Think of the use case properly and optimise using existing algorithms.

3. Left View Of Binary Tree

Moderate
30m average time
60% success
0/80
Asked in companies
SAP LabsZSThought Works

You have been given a Binary Tree of 'n' nodes, where the nodes have integer values



Example :
If the input tree is as depicted in the picture: 

alt text

The Left View of the tree will be:  2 35 2 
Problem approach

Step - 1 : Described all CRUD operations of nodes in binary tree and wrote methods for each operation.
Step - 2 : Cover corner cases like doing null validations

Try solving now
04
Round
Easy
HR Round
Duration20 minutes
Interview date9 May 2022
Coding problem1

1. Basic HR Questions

Tell me about yourself.
Are you Willing to relocate?
Have you any existing offers?

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
SDE - 1
5 rounds | 6 problems
Interviewed by Freshworks
1081 views
0 comments
0 upvotes
SDE - 1
2 rounds | 6 problems
Interviewed by Freshworks
1009 views
0 comments
0 upvotes
SDE - 1
2 rounds | 4 problems
Interviewed by Freshworks
906 views
0 comments
0 upvotes
SDE - 1
2 rounds | 4 problems
Interviewed by Freshworks
729 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
114579 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
57824 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
34961 views
7 comments
0 upvotes