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

SDE - 1

Cultfit
upvote
share-icon
4 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 1 month
Topics: Data Structures, Algorithms, System Design, Aptitude, OOPS
Tip
Tip

Tip 1 : Make a habit of solving at least 2-3 questions daily on any platform eg Leetcode/CodeStudio
Tip 2 : Practice questions across different topics 
Tip 3 : Do solve questions in time-bound environment.
 

Application process
Where: Linkedin
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

Tip 1 : Mention your achievements 
Tip 2 : Keep it true, like don't overcrowd the resume with false skills and experience. The interviewer might ask questions from resume.

Interview rounds

01
Round
Medium
Video Call
Duration60 minutes
Interview date15 May 2021
Coding problem2

Round started early morning on Google meet. Interviewer was pretty decent and skilled.

1. Find the only element that occurs once in the array

Easy
10m average time
90% success
0/40
Asked in companies
AmazonCultfitAtlassian

You are given an array A of length N, where N is always an odd integer. There are (N-1)/2 elements in the array that occur twice and one element which occurs once.

Your task is to find the only element that occurs once in the array.

Note: There are (N-1)/2+1 elements that are unique in the array.

Example:
Consider the array be 1,6,4,6,2,4,2
The integers 2, 4, 6 occur twice and only the integer 1 occurs once. 
Problem approach

Xoring the whole array

Try solving now

2. Leftmost & Rightmost Nodes of Binary Tree

Easy
20m average time
80% success
0/40
Asked in companies
CultfitAmazonWizork

Given a Binary Tree of 'N' number of total nodes, return the sequence of values of the leftmost and rightmost node at each level.

For example:
For the given binary tree: 

alt-text

Output: 1 2 3 4 6 7 10

Explanation: The leftmost and rightmost node respectively of each level are
Level 0: 1(only one node is present at 0th level)
Level 1: 2 3
Level 2: 4 6
Level 3: 7 10
Problem approach

Using level-wise order traversal, we will be maintaining the queue to store the pending nodes. Starting from the 0th level i.e the root node we will add root node into the queue. Now for each level stored into the queue(initially we have 0th level). We will poll nodes one by one from the queue and add corresponding children into the queue. While popping nodes we will also print the first(leftmost node) and last(rightmost node) nodes of that level. This way we will be having another level pending in our queue to traverse. This process goes on until the last level is traversed(see below algorithm for the approach).

Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date15 May 2021
Coding problem2

Happed same day in afternoon

1. System Design Question

I was given models of Posts and comments and was asked to write an implementation for getting comments for a post.

Problem approach

Tip 1 : Ask all relevant questions and be clear about the scope of the solution.
Tip 2 : Discuss everything that comes to mind.
Tip 3 : Keep incorporating feedbacks from the interviewer.
Tip 4 : Before actual implementation discuss your thoughts with the interviewer

2. Count number of subarrays with sum "K"

Moderate
15m average time
85% success
0/80
Asked in companies
SAP LabsIBMHSBC

You are given an integer array 'arr' of size 'N' and an integer 'K'.

Your task is to find the total number of subarrays of the given array whose sum of elements is equal to k.

A subarray is defined as a contiguous block of elements in the array.

Example:
Input: ‘N’ = 4, ‘arr’ = [3, 1, 2, 4], 'K' = 6

Output: 2

Explanation: The subarrays that sum up to '6' are: [3, 1, 2], and [2, 4].
Problem approach

Started with brute force N^2 solution then went on using maps.
 

Try solving now
03
Round
Hard
Video Call
Duration60 minutes
Interview date15 May 2021
Coding problem2

Happened same day around 3pm.

1. Find the total number of good Triplets

Moderate
30m average time
70% success
0/80
Asked in companies
CultfitLinkedIn

You are given two arrays, ‘ARR1’ and ‘ARR2’ of size ‘N’ and ‘M’. There are two types of good triplets.

Type 1: Triplet (i, j, k) If the square of ARR1[i] is equal to the product of ARR2[j] and ARR2[k], where 0 <= i <N and 0 <= j < k < M   
Type 2: Triplet (i, j, k) If the square of ARR2[i] is equal to the product of ARR1[j] and ARR1[k], where 0 <= i <M and 0 <= j < k < N   

Your task is to find the total number of good triplets.

Problem approach

My approach was to use a HashMap to store the frequency of the numbers. I used a HashMap to find the frequency of the quotient in the array when the square of the element of the other array is divided by the element in the array. I found the good triplets of both types separately.

Try solving now

2. Sum of minimum and maximum elements of all subarrays of size “K”

Moderate
25m average time
75% success
0/80
Asked in companies
AmazonCultfitNagarro Software

You are given an array consisting of N integers, and an integer, K. Your task is to determine the total sum of the minimum element and the maximum element of all subarrays of size K.

Note :

The array may contain duplicate elements.
The array can also contain negative integers.
The size of the array is at least 2.
There exists at least one such subarray of size k.
Problem approach

The idea behind this approach is to maintain two separate Dequeues(say, minDequeue and maxDequeue) which store the indices of the elements. In maxDequeue, we will maintain decreasing order of elements while in minDequeue we will maintain increasing order of elements. The idea for this approach is that we will keep only those elements that are candidates for our answer.

Try solving now
04
Round
Easy
HR Round
Duration30 minutes
Interview date15 May 2021
Coding problem1

Happened over google meet with Engineering Manager

1. Basic HR Question

Why should we hire you?

Problem approach

Tip 1 : Be as descriptive as possible. 
Tip 2 : Do overtalks.
Tip 3 : Show excitement and passion for the product. 
Tip 4 : Ask as many questions as possible

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
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Cultfit
1326 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 2 problems
Interviewed by Cultfit
1415 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Cultfit
1347 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Cultfit
725 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
114578 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
34960 views
7 comments
0 upvotes