# Nutanix Interview Experience | Set 1 (On-Campus for Internship)

• Difficulty Level : Expert
• Last Updated : 14 May, 2017

Nutanix visited my campus. There were 3 rounds in total:

Round 1 (coding round) :

2 questions were to be solved in 1hr 15min.
Question 1:
Given a string determine whether it is a ‘sum-string’. A string is called a sum-string if it satisfies the following properties:
len(s)>3
sub-string(i,x) + sub-string(x+1,j) = sub-string(j,l)
example:
“12358” is a sum string. Explanation : 1+2 = 3 ; 2+3 = 5 ; 3+5 = 8
“199100199” is a sum string. Explanation: 1+99 = 100 ; 99+100 = 199
“2368” is not a sum string.

Question 2:
Given 2 strings s1 and s2 determine whether s2 is a shuffle of s1. Where shuffle is defined as an operation that switches 2 children of a node in a binary tree.

```Example:
s1 = great
s2 = taerg

binary tree for s1
great
/    \
gr     eat
/ \    /   \
g  r   e    at

after shuffle we obtain,
great
/     \
eat     gr  (shuffle gr and eat as they are children of great node)
/ \     /  \
at   e    r    g
/  \
t    a```

so taerg is a shuffel string of s1.
This was a tricky question of the 2.
12 students qualified for the next round. I solved all the test cases of the 1st question and 5 test cases of question 2. So I was selected for 2nd round.

Round 2:

I was asked to solve a Dynamic Programming problem. Given a string of digits separated by operators ( + and *) only. Then parenthesize the string in such a way that first we get the max value possible and then we get the least value possible from the string. Return the difference of the two values calculated. I had to solve this problem on a paper sheet and explain the whole approach. I took 30 min to complete the code on paper along with the explanation. Then the interviewer tested my code for some simple cases : 2*2+2 => max is 2*(2+2) = 8 and min is (2*2)+2 = 6.