I-Interviewer, M-Me


I- What is your research interest?
M- Deep Learning, Machine Learning to some extent and Brain Sciences.


I- Draw the graph of y=$\frac{1}{(5-x)}$

M- Drawn ( take the mirror image of y=1/x graph across x-axis and then shift origin to
x=5, i.e., shift the graph 5 units forward on the x-axis.)


I- Tell me the role of double derivative in calculus?
M- It tells the rate of change of derivative(first derivative), if it is +ve, that means the
derivative is increasing which happens at a local minima point in a function, if it is -ve
we’ll reach a local maxima point.


I- How will you extend this concept to higher dimensions, like if z=f(x,y), then how’ll
be the double derivatives work?
M- Sir in that case we’ve to calculate partial double derivatives such as

(I meant to calculate the above) and check for particular conditions (which I didn’t remember but could possibly be
“Second Partial Derivative Test”) to see if it is a maxima or minima.
(‘I’ not much satisfied)


I- What is the derivative of a vector w.r.t. another vector?
M- couldn’t answer.(maybe the solution is a Jacobian Matrix.)


I- Do you’ve idea about gradients, like how are they useful in Machine Learning or in
general?

M- (possibly gave wrong answer ) Gradients help us to determine shape of the curve
which would help us to know maxima or minima and help in optimization. (‘I’ not
satisfied and cross questioned about what I said but I wasn’t able to elaborate and was
musing)


I- What is the role of Eigen Values and Eigen Vectors like in Principal Component
Analysis?
M- I haven’t digged deep into the maths of ML/DL but worked with the coding part.


I- How do you calculate Eigen Values and Vectors?

M- We solve $|A-λI|=0$ for Eigen Values and $\text{(A-λI)}\text{X=0}$ for Eigen Vectors.


I- Give an algo to find rank of a matrix?
M- Convert to row Echelon form, and then check number of non zero rows, basically
the number of independent rows.


I- Is row rank equal to the column rank, what is the proof that the row rank is equal to
the column rank?
M- Yes they are equal. Couldn’t give the proof.


I- Have you read anything from systems like OS etc?
M- No sir.


I- How will you store a sparse matrix?

M- Will store in a linked list, for every row a central node connected to all non zero
values in that row. (like a sparse graph stored in an Adjacency List)


I- How can you store them in an array?
M- didn’t remember(but the answer would be possibly using each non zero element as
a tuple (row, column, value) and store them in a n$\times$(no of non zero elements) sized
array.)


I- Suppose I’ve a polynomial of very very high degree, how’ll you store them?
M- Using linked list.


I- Can you write the structure of that linked list node you’ll use in that case in C?

M- struct node{
int coeff;//coefficient
int exp;//exponent
Struct node* next;//pointing to next higher degree of the polynomial
}


I- Suppose you’ve an m-ary complete tree with n nodes, what’ll be the height of the
tree?
M- $log_mn$

 

I- Create a BST from keys 10,5,4,20,15,11,30, tell me the number of levels and height?

M- Height=3


I- How’s the height 3 and what’s the number of levels?
M- Max root to deepest node distance is from 10 to 11 and no of edges in between is 3,
so height=3, No of levels=4, level 0(10), level 1(5,20), level 2(4,15,30), level 3(11).

 

I- What’ll be the avg comparisons to find a key in that BST?
M- approx 2.
(1 comparison to find 10, 2 each for (5,20), 3 each for (4,15,30), 4 for 11,so
avg. comparisons = $\frac{1\times1+2\times2+3\times3+4\times1}{7(total\text{ }elements)}$ = $\frac{18}{7}=2.57$)


I- Show me the exact fraction that you got?
M- $\frac{18}{7}$( ‘I’ satisfied)


I- No of BST possible with ’n’ keys?

M- $\frac{ \binom{2n}{n}}{(n+1)}$ Catalan Number


I- So you mugged it up, tell me how it is derived.
M- It is derived from the below recursive equation, suppose I choose a particular key
for root, now among (n-1) keys left, select ‘x’ keys for the left subtree, (n-1-x) will be
left for the right subtree, let T(k) denotes the no of BST possible with ‘k’ keys. Then,
$\text{T(n)} = \sum_{x=0}^{n-1}\text{T(x)}\times\text{T(n-1-x)}$.


I- Expand the expression for n=2 and 3.

M- T(2)=T(0)$\times$T(1)+T(1)$\times$T(0)=1$\times$1+1$\times$1=2
T(3)=T(0)$\times$T(2)+T(1)$\times$T(1)+T(2)$\times$T(0)=1$\times$2+1$\times$1+2$\times$1=5
I- Ok, we’re done.(Interview ends)

 

(P.S. — My interview lasted for around 30 minutes. I might have missed some
questions, and the above portray the picture of what I could remember, vague or exact.
I personally feel that they put so much emphasis on Calculus and Linear Algebra
because of my research interest being Machine and Deep Learning. They spent quite
significant time on my research interest rather than on just GATE subjects basics, so
basically you’ve to brush up in depth and read more and more proofs on concepts in
basic CS subjects(Data Structure, Algo, Engineering and Discrete Maths, OS,
Architecture etc.), read your research interest well, and good amount of mathematics,
starting from higher secondary to graduation level.)

posted in Interview Experience Jun 27, 2020 edited Jul 22, 2020 by
5,139 views
9
Like
0
Love
0
Haha
0
Wow
0
Angry
0
Sad