Intuit | OA | SDE Intern | August 2021 | India
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)
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).
Given an array, I had to return all the possible permutations of the array under specific conditions:
- If a number
xwas 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
ywas not present in the special array, then it should follow the condition:perm[y] > n * perm[y+1], wherenis the size of the input array (not the special array).
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 ColumbiaOutput:
0 1 0 0 1 0 0 1 0 0 0 1Explanation matrix:
Position isThisBerkeley isThisColumbia 0 1 0 1 1 0 2 1 0 3 0 1Note that the column headers are arranged lexicographically.