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

• Difficulty Level : Hard
• Last Updated : 17 Sep, 2017

Nutanix recently came to our college for recruiting interns. Around 130 people gave the coding round, and 12 were selected for interviews. Test was 1.5 hours long, with 2 questions.

Coding Round:

Hey geek! It's time to become a success story instead of reading them. Check out our most renowned DSA Self Paced Course, now at a student-friendly price and become industry ready. And if you are looking for a more complete interview preparation resource, check out Complete Interview Preparation Course that will prepare you for the SDE role of your dreams!

Feeling prepared enough for your interview? Test your skills with our Test Series that will help you prepare for top companies like Amazon, Microsoft, TCS, Wipro, Google and many more!

Q1: https://www.geeksforgeeks.org/minimum-positive-points-to-reach-destination/
I personally found the question tough. I started with the idea of representing dp[i][j] as the min number of points to reach till index [i][j] from [0][0]. However if you think deep you would get to know why’s it wrong, or in other words doesn’t produce the most optimal answer. 3 test cases passed.

Q2: Given a list of points with x and y coordinates, you have to calculate how many points are not dominated with any other point. A point ‘p’ is said to dominate another point ‘q’, if p(x)>q(x) AND p(y)>q(y).
It didn’t take me much time to solve this problem. All test cases passed.

Round 1 interview:
There were 3 people taking interview in parallel in three different cubicles. All of them asked the same questions to students giving the interview at the same time. Basically three people went, then all three came out, and next three went, and so on repeated two more time. So same set of questions to students having interview at the same time in parallel, and they would change questions for the next set of students.
Before telling questions asked to me, i would write down questions asked to others:
1. Given a linked list and pointer to a given node, how to delete this node. Note that pointer to no other node is given, not even the head. Just this given node. : https://www.geeksforgeeks.org/in-a-linked-list-given-only-a-pointer-to-a-node-to-be-deleted-in-a-singly-linked-list-how-do-you-delete-it/

2. Given a directed graph, find the mother vertex : https://www.geeksforgeeks.org/find-a-mother-vertex-in-a-graph/

3. Given an array of size n, find out the numbers which have duplicates. Numbers lie in the range 0 to n-1, and more than one number can have duplicates.: https://www.geeksforgeeks.org/find-duplicates-in-on-time-and-constant-extra-space/

Some more easy questions i don’t remember. Anyways, the following questions were asked to me:

1. Given a BST with two nodes swapped, find the two nodes, and swap them back (Note that you have to swap the nodes, not just the value within them).
He asked me to code the solution, which i did. He was satisfied with the solution.

2. Given an undirected graph, and each vertex having some value associated with it, find the number of connected components with total value (meaning the sum of value of all the nodes within that connected component) as prime.

Basically my first wound quite well. Before he started asking me questions, he even asked about me to explain any on of my project, like any favourite kind of. I explained him one related to orthogonal Latin Squares. He was quite happy to know what all i did.

Out of 12, 6 people got selected for the second round.

Round 2 interview:
3 people went first, next three immediately after them. As there wasn’t any possibility to discuss any question with those who went first, they gave exact same question to all.
It was a tech + HR round.
Only one tech question was asked, which was pretty simple.

Q: Given a BST with attributes Left*, Right*, Value, Locked, where locked and value are int, find out if a given node can be locked or not. A node can locked is none of it’s ancestor, or any node in the subtree with this given node as the root is locked.
I first told that i would do traversal till the given node (Given Node’s pointer is given, so i have the value, can do the traversal). I would check if there was any node which was locked while between reaching till that node. If yes, simply stop and print “Not Possible”. If no ancestor is locked, simply do some traversal of the subtree with that node as the root, and find if any node is locked. If yes, then print “Not Possible”. Else print “Yes”. She asked the complexity, i said O(Log(N)) for reaching till the node, and O(N) for the traversal of subgraph. Basically Brute force type. She asked to Optimise it. I asked if i can introduce one more attribute in “struct Node” definition. She allowed. Then i said i can do pre computation and find if any nodes’ subtree with that node as the root has any node in it’s subtree locked. If yes, i would set this new attribute. Then when queries are fired, simply reach till that node in O(logN) time, check for the ancestors in the way. And if reached successfully, check this newly introduced attribute. She was happy with solution. Asked me to code it, i did. Then couple of general HR questions.
I really found them quite chilled and cool people. Everything went well ðŸ˜‰ ðŸ˜€

Out of 6 people, two were finally selected. I enjoyed the whole process.

This article is contributed by Devvrit Khatri. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.

My Personal Notes arrow_drop_up