TNSET Data Structures and Algorithms Previous Year Questions
Try the preview and open any solution for a worked explanation.
TNSET practice pack
The practice pack for TNSET is coming soon to LawMint.
Question 1
Single array a[0 : MAXSIZE - 1] is used to implement two stacks. The two stacks grow from opposite ends of the array. Variables top 1 and top 2 (top 1 < top 2) point to the location of the topmost element in each of the stacks. If the space is to be used efficiently,
the condition for "stack full" is __________.
Question 2
my_recursive_function(n)
{
if (n == 0)
return
print(n)
my_recursive_function(n - 1);
}
my_recursive_function(10)Question 3
The worst case running time to search for an element in a balanced binary search tree with n2n elements is __________.
Question 4
The depth first search will use __________ as a structure to hold nodes for further processing.
Question 5
{
a = 1;
for (i is 1 to n)
{
if (i <= n/2)
{
for (j is 1 to i)
a = a + i;
}
else
{
a = a * i;
}
}
}Running time of Covid(n) isQuestion 6
| List I | List II |
|---|---|
| (1) PUSH | (a) STACK |
| (2) FIFO | (b) Stack insertion |
| (3) POP | (c) QUEUE |
| (4) LIFO | (d) Stack deletion |
Question 7
The breadth first search will use a __________ as a structure to hold nodes for further processing.
Question 8
| List I | List II |
|---|---|
| 1. Divide and conquer | (a) Dijkstra's shortest path algorithm |
| 2. Dynamic programming | (b) Tic-tac-toe |
| 3. Greedy Approach | (c) Binary Search tree |
| 4. Back tracking | (d) Control theory |
Question 9
What is the final value of the postfix expression B C D A D − + − +,
where A = 2, B = 3, C = 4, D = 5?
Question 10
Which of the following formula is used to find the address of in a matrix, when the elements are stored in row major order?
Previous papers with Data Structures and Algorithms questions
TNSET practice pack
The practice pack for TNSET is coming soon to LawMint.