# National Instruments Interview Experience | Set 5 (On-Campus – Internship)

• Difficulty Level : Medium
• Last Updated : 28 Jun, 2021

Round 1(Written):

Eligibility: All circuit branches.

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).

If a set has elements {1,2,3,4 …. n}. Then what is the sum of elements of it’s power set. (Ex: S = {1,2}. Then power set is {{},{1},{2},{1,2}}. The sum is 6.

If a set has elements {1,2,3,4,5,6,7,8,9,10}. Then how many subsets of 3 elements has no consecutive elements.

1 question was on designing a DFA for a string starting with a and ending with c and has at least b in it.

1 question had machine instructions. We had to find out minimum number of cycles needed to execute the given set of instructions. (a) If the instructions are executed in the given order. (b) If the instructions are executed in random order.
1 puzzle
In this round they not only see the answer. They also verify how you approached(So, give correct explanation to your answers. You will have ample amount of time.)
32 were shortlisted among 350. I was one among them.

2nd round(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
Input:
jon2snow3
8
Output:
n

2. Given an array and an integer k return the number of contiguous sub arrays whose sum is divisible by k.
input format:
n k
<n elements of the array>
input:
4 5
10 0 4 5

output:
4

explanation: {10},{0},{10,0},{5} are the sub arrays with sum divisible by 5.

Remember here also they review each individual’s code. I passed all 10 test cases of first questions and 11 test cases of 2nd question(3 cases exceeded the time limit. One case failed)
8 were shortlisted in this round.

3rd round(Technical + HR interview):