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

Product Engineer

Sprinklr
upvote
share-icon
3 rounds | 10 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 Months
Topics: Binary Tree , Stacks and Queue , Heap , DP , Arrays
Tip
Tip

Tip 1 : Always stay consistent in Coding
Tip 2 : Take help from others or make a group and keep daily targets set
Tip 3 : 500 Questions on leetcode will be great

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

Tip 1 : Do not put false information on Resume
Tip 2 : Whatever you write on resume , should be prepared thoroughly

Interview rounds

01
Round
Hard
Online Coding Interview
Duration90 Minutes
Interview date21 Jul 2021
Coding problem3

Evening time
Coding Round

1. Ninja And Covid-19 Vaccine

Moderate
15m average time
85% success
0/80
Asked in companies
MicrosoftSprinklrJosh Technology Group

The process of the COVID-19 vaccine has started in a special city structured like a binary tree. Ninja has been appointed as a doctor to do this vaccination. Some of the houses in the city are already vaccinated and Ninja wants to vaccinate the people in the remaining houses.

But the problem is that Ninja doesn’t remember the address of these remaining houses. However, he remembers that the houses that are still not vaccinated are at a ‘K’ distance from the last houses in the city. Ninja wants to find out how the number of these non-vaccinated houses.

Note :

The last house is similar to a leaf node in a binary tree and a house that is present at ‘K’ distance from the last house should be the direct ancestor of this last house.

For Example :

In this example :
2 is the direct ancestor of 4 and 5.
1 is the direct ancestor of 2, 3, 4, and 5.
Try solving now

2. Find Duplicate

Easy
0/40
Asked in companies
SprinklrDelhiveryAdobe

You have been given an integer array/list(ARR) of size N which contains numbers from 0 to (N - 2). Each number is present at least once. That is, if N = 5, the array/list constitutes values ranging from 0 to 3 and among these, there is a single integer value that is present twice. You need to find and return that duplicate number present in the array.

Note :
Duplicate number is always present in the given array/list.
Try solving now

3. Disjoint Intervals

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

Given a 2D array of size Nx2 which contains a set of ‘N’ intervals. Each interval contains a starting point and an ending point. You need to find the size of the maximal set of mutually disjoint intervals.

Two sets [a,b] and [c,d] are disjoint intervals if there is no common point between these two intervals.

For example: [5,7] and [8,10] are disjoint intervals but the intervals [5,7] and [7,10] is not a disjoint interval as they have a common point, 7 in them.

Try solving now
02
Round
Medium
Video Call
Duration70 Minutes
Interview date23 Jul 2021
Coding problem3

Morning time
Interviewer was nice and friendly

1. Copy List with Random Pointer

Easy
10m average time
90% success
0/40
Asked in companies
Urban Company (UrbanClap)AmazonMeesho

Given a linked list having two pointers in each node. The first one points to the next node of the list, however, the other pointer is random and can point to any node of the list or null. The task is to create a deep copy of the given linked list and return its head. We will validate whether the linked list is a copy of the original linked list or not.

A deep copy of a Linked List means we do not copy the references of the nodes of the original Linked List rather for each node in the original Linked List, a new node is created.

For example,

example

Random pointers are shown in red and next pointers in black.

Problem approach

Modifies the original list ... to contain new list..
currNode -----next--->its copyNode ---->next Curr Node--->Next Copy Node

first create teh whole list... by adding new nodes as next nodes
then, assign random pointers by iterating
//then separate the lists

Try solving now

2. Technical Question

How does google auto correct works according to me

Problem approach

Tip 1 : Trie Data Structure
Tip 2 : Relevant keywords according to the trend
Tip 3 : Replace all key with incorrect and check if new word exists in the dictionary and relevant to it or not

3. DBMS Question

Flow Diagram of Book My Show

03
Round
Hard
Video Call
Duration70 Minutes
Interview date23 Jul 2021
Coding problem4

Evening Timing

1. Trapping Rain Water

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

You have been given a long type array/list 'arr’ of size 'n’.


It represents an elevation map wherein 'arr[i]’ denotes the elevation of the 'ith' bar.



Note :
The width of each bar is the same and is equal to 1.
Example:
Input: ‘n’ = 6, ‘arr’ = [3, 0, 0, 2, 0, 4].

Output: 10

Explanation: Refer to the image for better comprehension:

Alt Text

Note :
You don't need to print anything. It has already been taken care of. Just implement the given function.
Problem approach

Using Two pointer approach - O(1) space and O(N) time
Using Stack - O(N) space and O(N) time

Try solving now

2. Puzzle

Four prisoners are given the opportunity of release and freedom if just one of them can work out the answer to a simple logic riddle. However, if they take part and one of them gives a wrong answer, or none of them can work out the answer at all, then their sentences will be doubled.

They are told that there are four hats. Two white and two black. Each man will have a hat placed on his head while blindfolded. When each man is wearing a hat the blindfolds will be removed. The prisoners will not be able to see their own hats and the only way they can work out what colour hat they are wearing will be from looking at the hats the other prisoners are wearing. All they have to do to win their freedom is for one of them to work out what colour hat he is wearing.

But there's a twist. To make it more interesting three prisoners stand in a line facing a brick wall. The prisoner at the back, A, stands on a box and can see both of the prisoners in front of him, B and C. Prisoner B stands on a smaller box and can only see prisoner C, who in turn can only see the wall. The fourth prisoner, D, stands on the other side of the wall and can see nothing of the other prisoners nor his own hat. They are not allowed to turn around, or converse in any way.

The prisoners are told that they have five minutes and to call out as soon as one of them thinks he knows for certain what colour hat he is wearing. But remember, if just one of them gets the answer wrong they will all have their sentences doubled.

Within the time allowed one prisoner calls out the right answer. Can you guess which one, what colour hat he is wearing and how he knew for sure?

Problem approach

After waiting about four minutes prisoner B calls out the right answer. He can see that C is wearing a white hat. If B was wearing a white hat too then A would have seen two white hats and would have known that his hat was black. As A didn't say anything B knew that he and C must have a different colour hats on and as C's hat is white, B knew that his hat must be black.

3. Minimum Cost Path

Moderate
25m average time
70% success
0/80
Asked in companies
HSBCHCL TechnologiesHCL Technologies

You have been given a matrix of ‘N’ rows and ‘M’ columns filled up with integers. Find the minimum sum that can be obtained from a path which from cell (x,y) and ends at the top left corner (1,1).

From any cell in a row, we can move to the right, down or the down right diagonal cell. So from a particular cell (row, col), we can move to the following three cells:

Down: (row+1,col)
Right: (row, col+1)
Down right diagonal: (row+1, col+1)
Problem approach

Minimum distance between source and destination using BFS algorithm.

Try solving now

4. Remove K Digits

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

You are given a non-negative integer ‘num’ in the form of a string and provided with an integer ‘k’.


You need to find the smallest integer possible by removing exactly ‘k’ digits from ‘num.’


Note :
‘num’ does not have leading zeros except when ‘num’ equals zero.
Example:
Input: ‘num’ = ‘141’ , ‘k’ = 1.

Output: ‘11’

Explanation: By removing only 1 digit from ‘num’, 3 numbers can be formed: 14, 11, and 41. Out of which 11 is the smallest number.
Note :
You don’t have to print anything. It has already been taken care of. Just implement the given function.
Try solving now

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
Product Engineer
5 rounds | 10 problems
Interviewed by Sprinklr
1250 views
0 comments
0 upvotes
company logo
Product Engineer
2 rounds | 4 problems
Interviewed by Sprinklr
1287 views
0 comments
0 upvotes
company logo
Product Engineer
3 rounds | 6 problems
Interviewed by Sprinklr
873 views
0 comments
0 upvotes
company logo
Product Engineer
3 rounds | 5 problems
Interviewed by Sprinklr
612 views
0 comments
0 upvotes