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

SDE - 1

Freshworks
upvote
share-icon
2 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 Months
Topics: Data Structures, Pointers, Arrays, Linked List, Oops, System Design, Docker, Kubernetes
Tip
Tip

Tip 1 : Practice aptitude from books
Tip 2 : Read ds, os 
Tip 3 : Watch youtube videos for learning

Application process
Where: Referral
Eligibility: No
Resume Tip
Resume tip

Tip 1 : Write your technical skills
Tip 2 : Google resume formats

Interview rounds

01
Round
Easy
Online Coding Test
Duration90 Minutes
Interview date6 Jan 2021
Coding problem4

1. Validate BST

Moderate
25m average time
0/80
Asked in companies
FacebookAmazonFreshworks

You have been given a binary tree of integers with N number of nodes. Your task is to check if that input tree is a BST (Binary Search Tree) or not.

A binary search tree (BST) is a binary tree data structure which has the following properties.

• The left subtree of a node contains only nodes with data less than the node’s data.
• The right subtree of a node contains only nodes with data greater than the node’s data.
• Both the left and right subtrees must also be binary search trees.
Example :

BST1

Answer :

Level 1: 

All the nodes in the left subtree of 4 (2, 1, 3) are smaller 
than 4, all the nodes in the right subtree of the 4 (5) are 
larger than 4.

Level 2 :

For node 2:
All the nodes in the left subtree of 2 (1) are smaller than 
2, all the nodes in the right subtree of the 2 (3) are larger than 2.
For node 5:
The left and right subtrees for node 5 are empty.

Level 3:

For node 1:
The left and right subtrees for node 1 are empty.
For node 3:
The left and right subtrees for node 3 are empty.

Because all the nodes follow the property of a binary search tree, the above tree is a binary search tree.
Try solving now

2. Search In A Row Wise And Column Wise Sorted Matrix

Moderate
15m average time
80% success
0/80
Asked in companies
AdobeNoBrokerOracle

You are given an 'N * N' matrix of integers where each row and each column is sorted in increasing order. You are given a target integer 'X'.


Find the position of 'X' in the matrix. If it exists then return the pair {i, j} where 'i' represents the row and 'j' represents the column of the array, otherwise return {-1,-1}


For example:
If the given matrix is:
[ [1, 2, 5],
  [3, 4, 9],
  [6, 7, 10]] 
We have to find the position of 4. We will return {1,1} since A[1][1] = 4.
Try solving now

3. Best Time to Buy and Sell Stock

Moderate
20m average time
80% success
0/80
Asked in companies
IntuitOptumOYO

You are given an array/list 'prices' where the elements of the array represent the prices of the stock as they were yesterday and indices of the array represent minutes. Your task is to find and return the maximum profit you can make by buying and selling the stock. You can buy and sell the stock only once.

Note:

You can’t sell without buying first.
For Example:
For the given array [ 2, 100, 150, 120],
The maximum profit can be achieved by buying the stock at minute 0 when its price is Rs. 2 and selling it at minute 2 when its price is Rs. 150.
So, the output will be 148.
Try solving now

4. Cycle Detection in a Singly Linked List

Moderate
15m average time
80% success
0/80
Asked in companies
GrabThalesSterlite Technologies Limited

You are given a Singly Linked List of integers. Return true if it has a cycle, else return false.


A cycle occurs when a node's next points back to a previous node in the list.


Example:
In the given linked list, there is a cycle, hence we return true.

Sample Example 1

Try solving now
02
Round
Easy
HR Round
Duration60 Minutes
Interview date7 Jan 2021
Coding problem2

HR + Tech round
After he introduced himself and his current role in the company, he asked some questions on OOPS features and Few SQL queries. He also asked some HR questions.

1. Delete a Node from Linked List

Moderate
40m average time
67% success
0/80
Asked in companies
QualcommFreshworksSamsung

You have been given a linked list of integers. Your task is to write a function that deletes a node from a given position, 'POS'.

Note :
Assume that the Indexing for the linked list always starts from 0.

If the position is greater than or equal to the length of the linked list, you should return the same linked list without any change.
Illustration :
The following images depict how the deletion has been performed.

Image-I :

Alt txt

Image-II :

Alt txt

Try solving now

2. Basic HR Questions

Q1.Tell me about yourself.
Q2.Why did you choose your College?
Q3.Did you get rejected by any of the companies and why?
Q4.Why Freshworks?

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
4 rounds | 8 problems
Interviewed by Freshworks
1134 views
0 comments
0 upvotes
SDE - 1
2 rounds | 4 problems
Interviewed by Freshworks
907 views
0 comments
0 upvotes
SDE - 1
2 rounds | 4 problems
Interviewed by Freshworks
730 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
57825 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
34961 views
7 comments
0 upvotes