CIA-I DSA Jan25
CIA-I DSA Jan25
Thanthai Hans Roever College (A), Elambalur, Perambalur - 621 220 Thanthai Hans Roever College (A), Elambalur, Perambalur - 621 220
CIA-I TEST, JANUARY 2025 CIA-I TEST, JANUARY 2025
I B.Sc (C.S) - DATA STRUCTURE AND ALGORITHMS I B.Sc (C.S) - DATA STRUCTURE AND ALGORITHMS
Time: 1½ Hours Maximum: 50 Marks Time: 1½ Hours Maximum: 50 Marks
Section - A (10 Marks) Section - A (10 Marks)
Answer all the questions. Answer all the questions.
i) a. Choose the correct answer out of four options. (3 x 1= 3 marks) i) a. Choose the correct answer out of four options. (3 x 1= 3 marks)
1. Which of the following is NOT a characteristic of a queue? 1. Which of the following is NOT a characteristic of a queue?
a) FIFO structure b) Linear data structure a) FIFO structure b) Linear data structure
c) Last-in, first-out d) Supports enqueue and dequeue c) Last-in, first-out d) Supports enqueue and dequeue
2. The postfix expression for A+(B×C)−DA+(B×C)−D is: 2. The postfix expression for A+(B×C)−DA+(B×C)−D is:
a) ABC×+D−ABC×+D− b) ABC×D−+ABC×D−+ a) ABC×+D−ABC×+D− b) ABC×D−+ABC×D−+
c) A+BC×−DA+BC×−D d) A+B×C−DA+B×C−D c) A+BC×−DA+BC×−D d) A+B×C−DA+B×C−D
3. W Which traversal method visits nodes in the order: left, root, right? 3. W Which traversal method visits nodes in the order: left, root, right?
a) Pre-order b) In-order c) Post-order d) Level-order a) Pre-order b) In-order c) Post-order d) Level-order
b. Fill in the blanks. (3 x 1 = 3 marks) b. Fill in the blanks. (3 x 1 = 3 marks)
4. ______ data structure is suitable for reversing a string 4. ______ data structure is suitable for reversing a string
5. The depth of a node in a tree is ____ 5. The depth of a node in a tree is ____
6. A self-loop in a graph indicate _____ 6. A self-loop in a graph indicate _____
ii) Answer all the questions. (very short answer) (2 x 2 = 4 marks) ii) Answer all the questions. (very short answer) (2 x 2 = 4 marks)
7. Define Data Structure 7. Define Data Structure
8. Define level of a tree 8. Define level of a tree
Section – B (4 x 5 = 20 marks) Section – B (4 x 5 = 20 marks)
Answer all the questions. (short answer type) Answer all the questions. (short answer type)
9. Explain the process of pre-order traversal of a binary tree. 9. Explain the process of pre-order traversal of a binary tree.
10. Explain the process of evaluating postfix expressions with an example 10. Explain the process of evaluating postfix expressions with an example
11. Illustrate polynomial addition with an example 11. Illustrate polynomial addition with an example
12. Write and explain the algorithm for pre-order traversal of a binary tree 12. Write and explain the algorithm for pre-order traversal of a binary tree
Section – C (2 x 10 = 20 marks) Section – C (2 x 10 = 20 marks)
Answer all the questions. (essay type) Answer all the questions. (essay type)
13. Write a brief note on Stacks and Queues 13. Write a brief note on Stacks and Queues
14. Briefly explain about Topological Sort and Critical Paths 14. Briefly explain about Topological Sort and Critical Paths
-------- --------