# Infrastructure Software Engineer Interview Questions

Infrastructure software engineer interview questions shared by candidates

## Top Interview Questions

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. 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; } Show More Responses |

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? |

How would you check if a binary tree is balanced? |

Past experience, Main programming language, A tricky Programming Problem to solve |

What part of Facebook's infrastructure interests you? What would you like to work on? |

Graph search, dynamic programming, binary search trees, arrays, designing a product release. |

Lists, multiple while loops, sequence and counts |

1. Coding Assessment: Given a file containing keys and values, how would you fetch a value for a key efficiently. |

find all bi-direct node pair of a graph given all edges. |

Given a input string and a dictionary, find the longest substring that also appear in the dictionary. each subset need to retain the original order of the characters. what's the efficiency of the solution ? |

**1**–

**10**of

**24**Interview Questions

## See Interview Questions for Similar Jobs

- Software Engineer
- Senior Software Engineer
- Software Development Engineer
- Software Developer
- Software Engineer Intern
- Infrastructure Engineer
- Intern
- Principal Software Engineer
- Data Scientist
- Software
- Software Engineering Intern
- Senior Software Development Engineer
- Program Manager