Nutanix Coding Interview Questions | Online Test

Nutanix Coding Interview Questions | Online Test

I have attended an interview for Nutanix for a software engineer profile. The mode of interview was online on Zoom meeting scheduled for an hour.

There was only one interviewer who jumped on the coding questions after the formal introduction.

Here are the questions they ask me in the first round online assessment test.

Nutanix Coding Interview Questions

They will share the online Google Sheet so that they can see what you write. You don’t need to write the executable code but the pseudo code.

Coding Question 1

Given an undirected rooted tree with N nodes. Each node i has a value associated with its val (i).

Input is in the form of an array with 0th index being the root.

Suppose you are given N nodes, then you’ll have an array of N integers.

And then the edges will be given between the indices of the array elements.

The tree is not necessarily a binary tree. It can be any general n-ary tree.

Example (Input Format as arguments):

N=6 (int)
Values= [54, 67, 23, 1, 3,… ] (vector)
Edges= [ {0,4}, {2,4}, {1,5}, {0, 1}…… ] (vector of pairs)

Also, check the binary tree interview questions.

Coding Question 2

This question is extended version of the first question.

You are given just a single query as an argument. An integer X is provided. You need to find the closest node to the root whose value >=X. Return the corresponding node value. If none are found,  return -1.

Coding Question 3

This question is again depends on the first question.

Now, you are given Q queries . Each query has an integer X provided.

For each query you need to find the closest node to the root whose value >=X.

If there are multiple nodes satisfying, output any.

Two crack this round, you have to practice solving coding questions. Later, solve the competitive coding questions.

During these questions, they want to check your approach and logic. Don’t bother about the syntax as we are only writing pseudocode. After providing a solution they will also ask you to explain the complexity of the program you wrote.


Editors’ Note: Nutanix coding interview questions and experience is shared by Nehadeep. We wish her all the best.

Leave a Reply

Your email address will not be published. Required fields are marked *