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

SDE - Intern

Intuit
upvote
share-icon
3 rounds | 8 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 4 months
Topics: Data Structures, Algorithms, Aptitude, OOPS, DBMS
Tip
Tip

Tip 1 : Must do Previously asked Interviews as well as Online Test Questions.
Tip 2 : Must have good knowledge of DSA
Tip 3 : Do at least 2 good projects and you must know every bit of them.

Application process
Where: Campus
Eligibility: Above 7 CGPA, Btech CSE, it
Resume Tip
Resume tip

Tip 1 : Have at least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects, and experiences more.

Interview rounds

01
Round
Medium
Online Coding Test
Duration90 minutes
Interview date13 Jan 2021
Coding problem4

There were 4 coding questions that were needed to be completed in 90 minutes.

1. Count all sub-arrays having sum divisible by k

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

Given an array ‘ARR’ and an integer ‘K’, your task is to find all the count of all sub-arrays whose sum is divisible by the given integer ‘K’.

Note:
If there exists no subarray in the given sequence whose sum is divisible by ‘K’ then simply return ‘0’.
Example:
Suppose the given array is ‘ARR’ = { 5, 0, 2, 3, 1} and ‘K = 5’.
As we can see in below image, there are a total of 6 subarrays that have the total sum divisible by ‘K’
So we return the integer 6.

subsequence

Problem approach

fix the left and right columns one by one and count sub-arrays for every left and right column pair. Calculate sum of elements in every row from left to right and store these sums in an array say temp[]. So temp[i] indicates sum of elements from left to right in row i. Count sub-arrays in temp[] having sum divisible by k. This count is the number of sub-matrices having sum divisible by k with left and right as boundary columns. Sum up all the counts for each temp[] with different left and right column pairs.

Try solving now

2. Boolean Evaluation

Moderate
10m average time
90% success
0/80
Asked in companies
AmazonIntuitUber

You are given an expression 'exp' in the form of a string where operands will be : (TRUE or FALSE), and operators will be : (AND, OR or XOR).


Now you have to find the number of ways we can parenthesize the expression such that it will evaluate to TRUE.


As the answer can be very large, return the output modulo 1000000007.


Note :

‘T’ will represent the operand TRUE.
‘F’ will represent the operand FALSE.
‘|’ will represent the operator OR.
‘&’ will represent the operator AND.
‘^’ will represent the operator XOR.

Example :

Input: 'exp’ = "T|T & F".

Output: 1

Explanation:
There are total 2  ways to parenthesize this expression:
    (i) (T | T) & (F) = F
    (ii) (T) | (T & F) = T
Out of 2 ways, one will result in True, so we will return 1.
Problem approach

It can be solved by filling a table in a bottom-up manner.

Try solving now

3. Minimum Cost To Buy Oranges

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

You are given a bag of size 'W' kg and provided with the costs of packets with different weights of oranges as a list/array with the name 'cost'. Every i-th position in the cost denotes the price of 'i+1' kg packet of oranges.

If at any point in time the i-th cost is -1, it means that 'i+1' kg packet of orange is unavailable.

You are required to find the minimum total cost to buy exactly 'W' kg oranges and if it's not possible to buy precisely W kg oranges then print -1. There is an infinite supply of all available packet types.

Note :
Array index 'i' denotes the cost of (i+1)kg packet. 
Example: cost[0] is the cost of a 1kg packet of oranges.
Problem approach

Create matrix min_cost[n+1][W+1], where n is number of distinct weighted packets of orange and W is the maximum capacity of the bag.
Initialize the 0th row with INF (infinity) and 0th Column with 0.
Now fill the matrix
if wt[i-1] > j then min_cost[i][j] = min_cost[i-1][j] ;
if wt[i-1] <= j then min_cost[i][j] = min(min_cost[i-1][j], val[i-1] + min_cost[i][j-wt[i-1]]);
If min_cost[n][W]==INF then output will be -1 because this means that we cant not make weight W by using these weights else output will be min_cost[n][W].

Try solving now

4. Time To Burn Tree

Hard
50m average time
50% success
0/120
Asked in companies
OLX GroupPhonePeMicrosoft

You have a binary tree of 'N' unique nodes and a Start node from where the tree will start to burn. Given that the Start node will always exist in the tree, your task is to print the time (in minutes) that it will take to burn the whole tree.


It is given that it takes 1 minute for the fire to travel from the burning node to its adjacent node and burn down the adjacent node.


For Example :
For the given binary tree: [1, 2, 3, -1, -1, 4, 5, -1, -1, -1, -1]
Start Node: 3

    1
   / \
  2   3
     / \
    4   5

Output: 2

Explanation :
In the zeroth minute, Node 3 will start to burn.

After one minute, Nodes (1, 4, 5) that are adjacent to 3 will burn completely.

After two minutes, the only remaining Node 2 will be burnt and there will be no nodes remaining in the binary tree. 

So, the whole tree will burn in 2 minutes.
Problem approach

apply recursion and for every node calculate the below-required values: 

Left Depth.
Right Depth.
The time required for fire to reach the current node.
Is the current subtree contains initial burnt leaf node.
So, for the minimum time required to burn any subtree will be: 

The time required for fire to reach the root node from initial burnt leaf + depth of the opposite side

Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date21 Jan 2021
Coding problem2

In this round there were 2 Senior Engineers who asked about my past work, questions on tech stack i have used in my projects followed by 2 DSA questions which were interlinked

1. Jump Game

Moderate
15m average time
85% success
0/80
Asked in companies
Deutsche BankGoldman SachsAmazon

You have been given an array 'ARR' of ‘N’ integers. You have to return the minimum number of jumps needed to reach the last index of the array i.e ‘N - 1’.


From index ‘i’, we can jump to an index ‘i + k’ such that 1<= ‘k’ <= ARR[i] .


'ARR[i]' represents the maximum distance you can jump from the current index.


If it is not possible to reach the last index, return -1.


Note:
Consider 0-based indexing.
Example:
Consider the array 1, 2, 3, 4, 5, 6 
We can Jump from index 0 to index 1
Then we jump from index 1 to index 2
Then finally make a jump of 3 to reach index N-1

There is also another path where
We can Jump from index 0 to index 1
Then we jump from index 1 to index 3
Then finally make a jump of 2 to reach index N-1

So multiple paths may exist but we need to return the minimum number of jumps in a path to end which here is 3.
Problem approach

1.) if the curr index becomes out of range (i.e., 0>curIndex>=arr.length) then you cant reach any other index now, so no need to go further from there.
2.) If you reached the same index again, that means now you are stuck in a cycle, you will keep coming to and fro to this index so gain don't go further.
So if any of the two condition written above comes before reaching to the index having value 0 , directly leave checking further from there and check other direction because now its sure that you can't reach to your target indexat least from this index.

Try solving now

2. Candy Distribution

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

You are given an integer ‘N’ and an array ‘A’ of size ‘N’ containing positive integers.

You have ‘N’ friends, and you want to give each of them some candies. The ‘ith’ friend will be happy if they receive at least ‘A[i]’ candies. You want to distribute candies among your friends to fulfill the following two conditions.

No two friends have the same number of candies.

Every friend is happy.

Your task is to find the minimum candies required for distributing such that both conditions are met. If no distribution fulfills both given conditions, report it.

Example :
‘N’ = 5, ‘A’ = [3, 3, 2, 5, 1]
If we distribute candies in the following manner [4, 3, 2, 5, 1],
Each friend will be happy as they have at least received ‘A[i]’ candies, and no two friends got the same number of candies.
Hence, the answer is (4 + 3 + 2 + 5 + 1) = 15. It’s guaranteed that this is the minimum number of candies required.
Try solving now
03
Round
Easy
Video Call
Duration60 minutes
Interview date22 Jan 2021
Coding problem2

This round was taken by an engineering manager who asked about my past internships and projects i did there. Then she asked me a system design question followed by a coding problem

1. System Design Question

Design a URL Shortening Service

Problem approach

Tip 1 : Ask The requirements if not clear
Tip 2 : share your thought process 
Tip 3 : Practice previously asked questions .

2. Merge k sorted lists

Hard
25m average time
65% success
0/120
Asked in companies
AmazonIntuitPayPal

Given 'k' sorted linked lists, each list is sorted in increasing order. You need to merge all these lists into one single sorted list. You need to return the head of the final linked list.


For example:
Input:
3
3
4 6 8
3
2 5 7 
2
1 9

Output:
1 2 4 5 6 7 8 9 

Explanation:
First list is: 4 -> 6 -> 8 -> NULL
Second list is: 2 -> 5 -> 7 -> NULL
Third list is: 1 -> 9 -> NULL
The final list would be: 1 -> 2 -> 4 -> 5 -> 6 -> 7 -> 8 -> 9 -> NULL
Problem approach

Create dummy node in linked list, which will help us to deal with border cases, such as empty lists and so on.
curr is current element in linked list where are in now.
Put all starts of k linked lists to heap (actually there can be less than k, because some of lists can be empty)
Extract val, ind element from our heap: it will be current minumum element, and attach it to the end of constucted merged least so far, move curr iterator to the right.
If we still did not reach the end of current list, move one step to the right in this list and put new candidate to heap.
Return dummy.next.

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

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Intuit
4331 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 3 problems
Interviewed by Intuit
3052 views
2 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 5 problems
Interviewed by Intuit
1237 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Intuit
1414 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Amazon
15605 views
4 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Microsoft
15499 views
1 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Amazon
10216 views
2 comments
0 upvotes