Intuit | OA | SDE Intern | August 2021 | India
Anonymous User
2105

Intuit visited our campus and the following problems appeared in the online coding round:

  1. N-Queens Problem : https://leetcode.com/problems/n-queens/

  2. A variation of Heaters problem : https://leetcode.com/problems/heaters/description/
    In this problem, total number of houses were given instead of house positions. It had to be assumed that there is a house at every positive integer value upto n.
    After determining the minimum radius, the answer had to be returned with the decimal precision of 9. (eg. 1.000000000 instead of 1)

  3. Given an array, we had to return all the possible permutations of the array given the
    following conditions:
    There was a special array provided in the input.

  • If a number x was in this special array, then the permutation should follow:
    perm[x]<perm[x+1]. This means that if number 3 is in the special array, then the
    number on the 3rd index should always be less than the number on the 4th index
  • If a number was not present in the special array, then it should follow:
    perm[y]>n*perm[y+1] where n is the size of input array(not special array).
  1. A 2D vector of strings was given.Each row of vector will be of the form {Position , RandomString}.We had to return a 2D vector of strings such that the number of columns will be equal to 1 + Number of unique strings in Column 2 of Input Matrix.
    Each column represented each unique string given. And in every ith row, the first value again represented the position (i.e i), and after that the column representing ith string of input matrix was set to 1 and rest other columns were set to 0. Also, these columns represented each string in lexographical order. In order to understand better, you can think of each column header in your output matrix to be 'isThisUniqueString1'.

    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
    0                   1                          0
    0                   1                          0
    0                   0                          1

    Note that the column headers are arranged lexicographically.

Job location:Bangalore, Stipend: 80k/month, CGPA cutoff: 7.5

Comments (1)