Infrastructure Engineer Interview Questions | Glassdoor

Infrastructure Engineer Interview Questions

157

Infrastructure engineer interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

Write a function that takes 2 arguments: a binary tree and an integer n, it should return the n-th element in the inorder traversal of the binary tree.

7 Answers

Correct answer should be something like this: int FindNthElement(Node *node, int &n) { if (node->Left && n > 0) { k = FindNthElement(node->left, n); if (n == 0) return k; } if (n == 0) return node->value; else if (n > 0 && node->right) { k = FindNthElement(node->right, n); if (n == 0) return k; else return -1; } }

int findNthElementByInorder(Node *node, int &n) { if (node == null) return -1; findNthElementByInorder(node->left, n); if (n == 0) return node-> value; else n--; findNthElementByInorder(node->right, n); }

Seems it should be something like this, get the to bottom and start counting up from there. int start(Node *node, int &n) { int element = 0; if (node == null) return -1; return findElementIndex(node, element, n); } int findElementIndex(Node *node, int &currentNumber, int findNumber) { if(node->left != null ) { int result = findElementIndex(node->left, currentNumber, findNumber); if(result != -1) return result; } if(node->right != null ) { int result = findElementIndex(node->right, currentNumber, findNumber); if(result != -1) return result; } currentNumber++; if(currentNumber == findNumber) return node->value; else return -1; }

Given 2 very large numbers, each of which is so large it can only be represented as an array of integers, write a function to multiply them.

3 Answers

Write a function to compute the square root of a number without using any built-in functions.

2 Answers

If a large sequence of commits are in the main (master) branch of a git repository and only a subset are desired for a new branch, how would you create that new branch?

2 Answers

How would you check if a binary tree is balanced?

1 Answer

What command do you use to find OSPF neighbors? Seriously?

1 Answer

I was asked a few questions about software engineering in a language I didn't know.

1 Answer

DO you InfiniBand fabrics ? Communication with IB is faster or on TCP ? Why ?

1 Answer

How many communication protocols you know for data transmission ?

1 Answer

Would ask a questions and when I began to answer he would interrupt to challenge the answer. I hadn't given the answer.

1 Answer
110 of 157 Interview Questions