Data Structures and Algorithms 2023

Question Paper Details
Tribhuwan University
Faculty of Humanities and Social Sciences
OFFICE OF THE DEAN
2023
Bachelor of Computer Applications
Course Title: Data Structures and Algorithms
Code No: CACS201
Semester: Third Semester
Full Marks: 60
Pass Marks: 24
Time: 3 hours
Candidates are required to answers the questions in their own words as far as possible.

Candidates are required to answer the questions in their own words as far as possible.

Official Answer
AI Generated Answer

AI is thinking...

Group B

Official Answer
AI Generated Answer

AI is thinking...

Attempt any SIX questions.

Official Answer
AI Generated Answer

AI is thinking...

2. Define stack. Why stack is considered as an ADT?List any four applications of stack.

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

3. Evaluate the following postfix expression using the stack: 4 5 + 7 3 - 2 + *

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

4. What is tower of Hanoi problem? How recursion can be used to solve tower of Hanoi problem?

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

5. Define hashing. Explain how to resolve collisions during hashing using open addressing.

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

6. What is binary search? Trace the algorithm of binary search a key 12 in the data:

11,19,5,2,7,21,8,21,12

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

7. What id big-oh notation? Explain about divide and conquer strategy with example.

5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

8. What are the depth and degree of a node in a tree? Perform pre-order, in-order and post-order traversal of the following tree:


5 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

Group C

Official Answer
AI Generated Answer

AI is thinking...

Attempt any TWO questions.

Official Answer
AI Generated Answer

AI is thinking...

9. How dynamic implementation of the queue can be done? Explain with algorithm. Also explain how insertion and deletion of a node can be done at the end of a singly linked list with algorithm.

10 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

10. Define complete binary tree and skewed tree. Write a function to implement heap sort and sort the following data using heap sort: 12,9,1,13,16,2,4,21,5

10 marks
Details
Official Answer
AI Generated Answer

AI is thinking...

11. How breadth first traversal and depth first traversal can be used for traversing a graph? Explain with example. Use Dijkstra's algorithm to find the shortest path from node A to all other nodes for the following graph.


10 marks
Details
Official Answer
AI Generated Answer

AI is thinking...