Intuit | OA | SDE Intern | August 2021 | India

intuit logo
intuit
SDE InternBangalore
August 25, 20213 reads

Summary

I recently participated in the Intuit Online Assessment for an SDE Intern position in August 2021. The OA consisted of four distinct coding challenges, including a classic N-Queens problem, a variation of the Heaters problem, a complex permutation problem with specific positional constraints, and a unique 2D string vector transformation task.

Full Experience

Intuit visited our campus for SDE Intern hiring in August 2021. The online coding round was quite challenging, featuring four distinct problems. I had to solve them within the given time limit. The problems covered a range of topics from standard backtracking to more intricate data manipulation and custom constraint handling, requiring careful thought and implementation.

Interview Questions (4)

Q1
N-Queens Problem
Data Structures & Algorithms

The classic N-Queens problem, where the goal is to place N non-attacking queens on an N×N chessboard.

Q2
Heaters Problem Variation
Data Structures & Algorithms

This was a variation of the LeetCode Heaters problem. Instead of given house positions, the total number of houses (N) was provided, and it had to be assumed that a house exists at every positive integer value up to N. After determining the minimum radius required to heat all houses, the answer needed to be returned with a decimal precision of 9 (e.g., 1.000000000 instead of 1).

Q3
Permutations with Positional Constraints
Data Structures & Algorithms

Given an array, I had to return all the possible permutations of the array under specific conditions:

  • If a number x was present in a special array provided as input, then the permutation must follow the condition: perm[x] < perm[x+1]. This meant that if, for example, the number 3 was in the special array, then the number at the 3rd index (0-indexed) of the permutation should always be less than the number at the 4th index.
  • If a number y was not present in the special array, then it should follow the condition: perm[y] > n * perm[y+1], where n is the size of the input array (not the special array).

Q4
2D Vector String One-Hot Encoding
Data Structures & Algorithms

I was given a 2D vector of strings where each row was of the form {Position, RandomString}. The task was to return a new 2D vector of strings such that the number of columns would be equal to 1 + Number of unique strings in Column 2 of the input matrix. Each of these new columns represented a unique string from the input, arranged in lexicographical order. For every i-th row in the output, the first value again represented the position (i.e., i), and subsequently, the column representing the i-th string of the input matrix was set to 1, with all other string-representing columns set to 0.

For example:
Input:

0 Berkeley
1 Berkeley
2 Berkeley
3 Columbia
Output:
0 1 0
0 1 0
0 1 0
0 0 1
Explanation matrix:
Position      isThisBerkeley      isThisColumbia
0                    1                           0
1                    1                           0
2                    1                           0
3                    0                           1
Note that the column headers are arranged lexicographically.

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!