# National Instruments | Software Engineer | 2021

**Online Test -**This was a written round consisting of both aptitude and technical questions.There were only 10 questions, 90 minutes duration. 1 question was on time complexity of searching an unsorted array. 2 questions were on recursion, ie, number of recursive calls. 1 question on analysing given function on string. 1 question was on probability(Two hotels, say A and B. Probability of moving from A to B is 2/3, staying at A is 1/3. Probability of moving from B to A and staying at B is 1/2. If they make decisions each hour, and if they were at A at 7:00 pm, what is the probability that they will be at B at 10:00 pm).

**Coding Round -**Two questions were there. 3 hours duration. 1. Long question, I don’t remember fully. I’ll just give input/output examples. It was basically on string decoding. If jon2snow3 is there the decoded string will be jonjonsnowjonjonsnowjonjonsnow. Given a string and an integer k we have print the kth character in the decoded string

**Technical+Hr -**Tell me about yourself. Then they asked about one of my projects. About the module I had used it’s features). They asked me optimise the code I had written for the first question(I had created the new string as specified in the question) and write code for that. Given a binary tree, find out the maximum sum path from root to leaf. This problem, but they said tree has only positive integers.This is given here at GeeksforGeeks. To store the path I had used global array. They asked me alternative to global array, I said passing array as parameter. Then they asked me about disadvantages of using global variables. Given a list of words. Given three operations find out the minimum steps to reach from source string to destination string. Basically, this is some modification of this problem. For this question I said I will use graph traversal techniques. So, they started asking about BFS and DFS, when to use them.