Bangalore University
I Semester BCA Examination (NEP - SCHEME)
Subject: COMPUTER SCIENCE
PAPER: DATA STRUCTURES
MODEL PAPER -2
Time: 2 hours Max. Marks: 60
Instruction: Answer any FOUR questions from each part
PART- A
I. ANSWER ANY 4 QUESTIONS
Each question carries 2 marks 4x2=8
1. What is the relationship between ADT and Data Structures?
2. What is Garbage Collection?
3. Convert (A + B / C * D ) – F + E into Postfix form.
4. Mention the different ways of tree traversal.
5. What is AVL tree?
6. What is Hashing? Define Hash function.
PART-B
II. ANSWER ANY 4 QUESTIONS
Each question carries 5 marks 4 x 5 = 20
7. Explain i) Time and space complexity and ii) Time and space trade off.
8. Write a C program to check whether given matrix is Sparse matrix or Not.
9. Define stack. Write a C program to Push and Pop elements into stack.
10. What is Recursion? Write a C function for tower of Hanoi problem.
11. Consider the graph shown below. Starting at vertex 1, traverse the graph by DFS.
1
3
2
5 6 7
4
8
12. Explain Collision resolution by chaining.
PART-C
III. ANSWER ANY 4 QUESTIONS
Each question carries 8 marks 4 x 8 = 32
13. A) Define Linear Array. Write ADT of a Linear array. (4+4)
B) Write an algorithm to delete an element from a linear array.
14. A) Explain the node structure of singly linked list. Mention the advantages of linked
list over arrays.
B) Define Priority queue. (5+3)
15. A) What is queue? Write a program to implement linear queue using arrays (6+2)
B) Mention any two applications of stacks.
16. What is Linked List? Write a C program to create a SLL and perform inserting,
deleting and display the content of list.
17. A) Define AVL tree. Explain the Balancing Factor with an example ( 5+3)
B) Write a note on (a) Directed graph (b) Indegree (c) Outdegree of a graph.
18. A) Explain the working of merge sort for 35, 10, 15, 45. 25. 20, 40. (4+4)
B) Write an algorithm to sort an array using Insertion sort and trace the algorithm for
5 elements.
*********** ALL THE BEST ***********