Intuit visited our campus and the following problems appeared in the online coding round:
N-Queens Problem : https://leetcode.com/problems/n-queens/
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)
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.
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