0% found this document useful (0 votes)
19 views8 pages

BIM Old Questions

Uploaded by

sumishaacharya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views8 pages

BIM Old Questions

Uploaded by

sumishaacharya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

TRIBHUVAN UNIVERSITY

FACULTY OF MANAGEMENT F.M.: 40


Office of the Dean P.M.: 20
July 2022 Time:- 2 hrs
BIM/Fourth Semester/IT 218: DSA with Java
Group'A'
Brief answer questions.[10*1=10]

1. Why do we need asymptotic notation?


2. What do you mean by Class-NP problem?
3. Define under flow and over flow case in Stack.
4. What do you mean by self-organizing list?
5. List any two disadvantages of recursion.
6. Define mid square function with example.
7. What is topological ordering?
8. How spanning tree is different from minimum spanning tree?
9. Differentiate between graph and tree.
10. What happens when hash collide?
Group 'B'
Exercise Problems:[5*4=20]
11. Write a java method to delete an element from the specific position in doubly linked list.
12. Write a java program to implement push and pop operations of stack.
13. Find the shortest path costs between all pairs of vertices in the given graph.

14. Create a max heap from the following set of elements showing all the steps with explanation.
2, 8, 6, 1, 10, 15, 3, 12, 11
15. Sort the following data using Quick Sort.
10, 1234, 9, 7234, 67, 9181, 733, 197, 7, 3
Group 'C'
Comprehensive Answer Questions: [2*5=10]
16. Why do we need to balance the height of BST? Describe the need and types of rotations in AVL
tree.
17. How B+ tree is different from B tree? Explain.
TRIBHUVAN UNIVERSITY
FACULTY OF MANAGEMENT F.M.: 40
Office of the Dean P.M.: 20
August 2021 Time:- 2 hrs
BIM/Fourth Semester/IT 218: DSA with Java
Group'A'
Brief answer questions.[10*1=10]

1. Differentiate between exact complexity and asymptotic complexity?


2. What is Class P problem?
3. List any one disadvantage of recursion.
4. Define spanning tree.
5. What are recursive and base cases in recursion?
6. Define activation record.
7. How does Binary Search Tree differ from an AVL tree?
8. List out the properties of a B-tree.
9. How do you choose pivot element in Quick Sort?
10. Why is sorting required?
Group 'B'

Exercise Problems: [5*4=20]

11. Write a java functions to push elements in a stack.


12. Write a java function to insert an element in specific position of a singly linked list.
13. Sort the following using Selection Sort:
10, 8, 12, 13 ,9 ,7, 6, 4
14. Write a program to solve Tower of Hanoi problem using recursion.
15. Insert the following in a hash table of size 12:
44, 15, 30, 45, 55, 72, 90, 115, 35, 10

(Use Bucket Addressing to resolve the problem of collision)

Group 'C'

Comprehensive Answer Questions: [2*5=10]

16. What is Multiway tree? Explain the deletion process of a B-tree.


17. What is a graph? Explain Breadth First and Depth First Graph Traversal techniques.
TRIBHUVAN UNIVERSITY
FACULTY OF MANAGEMENT F.M.: 40
Office of the Dean P.M.: 20
September 2019 Time:- 2 hrs
BIM/Fourth Semester/IT 218: DSA with Java
Group'A'
Brief answer questions.[10*1=10]

1. What are rear and front in queue?


2. Define big Oh notation.
3. Define recursion.
4. Define skip list.
5. What is B-tree?
6. Define breath first traversal.
7. What is linked list?
8. Write the advantages of binary search over the linear search.
9. What is shortest path problem?
10. What is AVL tree?
Group 'B'

Exercise Problems:[5*4=20]

11. Write a java class to implement stack with push and pop functions.
12. Write a method to insert a node in circular doubly linked list at end. Also make appropriate
assumptions.
13. Write a hash method to insert following data in a Hash Table of size 10:
24, 20, 37, 84, 50, 47, 67 and 74
14. Write java function or algorithm for finding, the minimum spanning tree using Kruskal's
algorithm.
15. Explain topological sort with example.
Group 'C'

Comprehensive Answer Questions: [2*5=10]

16. Is O(n2) algorithm better than O(nlogn) algorithm? Explain with example.
17. Write limitation of binary search tree? Explain why concept of slaying used in trees?
TRIBHUVAN UNIVERSITY
FACULTY OF MANAGEMENT F.M.: 40
Office of the Dean P.M.: 20
July 2022 Time:- 2 hrs
(Make up)
BIM/Fourth Semester/IT 218: DSA with Java
Group'A'
Brief answer questions.[10*1=10]

1. What is Big-Theta notation?


2. Why is queue called FIFO data structure?
3. What are the drawbacks of a linked list?
4. Differentiate between tail and non-tail recursion.
5. What is splaying?
6. Define heap?
7. What is binary tree?
8. What is a diagraph?
9. Why data is sorted?
10. What are the different collision resolution techiniques?
Group 'B'

Exercise Problems:[5*4=20]

11. Write java function to demonstrate linked list implementation of stack.


12. Write a java function to delete an element from specific position from a singly linked list.
13. Create an AVL tree from the following:
1, 17, 16, 18, 20, 21, 22, 31, 30, 39
14. Insert the following data in a Hash Table, where the table size is 100:
82, 47, 48, 71, 98, 10, 37, 69, 22, 82
(Use any suitable collision resolution technique in case of collision)
15. Write a function in java to sort 'n' numbers in an array using selection sort.
Group 'C'

Comprehensive Answer Questions: [2*5=10]

16. What is B-tree? Explain the insertion process of a B-tree?


17. Explain how Kruskal's Algorithm can be used to find the minimum spanning tree, with an
appropriate example.
TRIBHUVAN UNIVERSITY
FACULTY OF MANAGEMENT F.M.: 40
Office of the Dean P.M.: 20
September 2018 Time:- 2 hrs
BIM/Fourth Semester/IT 218: DSA with Java
Group'A'
Brief answer questions.[10*1=10]

1. Define data structure.


2. How does stack differ from queue?
3. Why is doubly linked list better than singly linked list?
4. List the advantages of recursion over loop.
5. What is Binary Search Tree?
6. What is multi-way tree?
7. Define weighted graph.
8. In how many ways graph can be represented in computer?
9. What is tail recursion?
10. List the different types of hash function.
Group 'B'

Exercise Problems: [5*4=20]

11. Write java function to demonstrate push, pop and traversal operations of stack.
12. Write a java function to insert an element at specific position in a doubly linked list.
13. Create a max heap from the following: Show all steps.
17, 27, 16, 29, 35, 20, 75, 18, 35
14. Write a hash function to insert element to list.
15. Sort the following data using Radix Sort: Show all steps.
23, 76, 53, 40, 67, 1, 212, 21

Group 'C'

Comprehensive Answer Questions: [2*5=10]

16. What is B tree? What are the benefits of B tree over Binary Search Tree?
17. How cycle in a graph can be detected? Explain depth first search.
TRIBHUVAN UNIVERSITY
FACULTY OF MANAGEMENT F.M.: 40
Office of the Dean P.M.: 20
September 2017 Time:- 2 hrs
BIM/Fourth Semester/IT 218: DSA with Java
Group'A'
Brief answer questions.[10*1=10]

1. What is doubly linked list?


2. What do you mean by cut vertex?
3. Define spanning tree.
4. What is circular queue?
5. Why worst case complexity is mostly used in algorithm design than best and average case
complexity?
6. Define nested recursion.
7. What is hashing? Write down various approaches used for resolving hash collison.
8. Define skip list.
9. What do you mean by order of B tree?
10. What is heap?
Group 'B'

Exercise Problems: [5*4=20]

11. Write a Java functions to insert element into queue.


12. Create heap tree from given data and sort it using heap sort: 12, 23, 44, 56, 33, 67, 37
13. Write a Java function to delete an element at any position from circular linked list.
14. Sort the following given data using Quick Sort Algorithm.
5, 66, 3, 8, 91, 45, 88, 91, 33
15. Write all possible topological sorts from given graph.

Group 'C'

Comprehensive Answer Questions: [2*5=10]

16. What is problem with Binary tree? Explain self-adjusting tree with example.
17. What is the limitation of B-tree? How is element of B tree deleted? Explain with example.
TRIBHUVAN UNIVERSITY
FACULTY OF MANAGEMENT F.M.: 40
Office of the Dean P.M.: 20
September 2016 Time:- 2 hrs
BIM/Fourth Semester/IT 218: DSA with Java
Group'A'
Brief answer questions.[10*1=10]

1. What is data structure?


2. Why is Big Oh notation used?
3. Why are linked lists preferred over arrays?
4. What is linear queue?
5. Define activation record.
6. What is Binary tree?
7. What is B tree?
8. List out the methods that can be used to represent graph in memory.
9. What is sorting?
10. For which purpose Kruskal's algorithm is used?
Group 'B'

Short answer questions: [5*4=20]

11. Write a Java function to insert element into queue.


12. Write a Java function to delete the last node from a circular linked list.
13. Write a program in Java to display fourth element of the Fibonacci Series.
14. Insert the following data in a Hash Table, where the table size is 10:
22, 18, 37, 88, 50, 47, 69, 72

(Use any suitable technique to resolve hash collision)

15. Show the steps to sort given data using Merge Sort:
36, 48, 23, 59, 68, 44, 97, 99, 91, 18, 33
Group 'C'

Comprehensive Answer Questions: [2*5=10]

16. Write steps to insert key into B tree.


17. How a node of a Binary tree can be deleted? Explain with examples.
TRIBHUVAN UNIVERSITY
FACULTY OF MANAGEMENT F.M.: 40
Office of the Dean P.M.: 20
September 20175 Time:- 2 hrs
BIM/Fourth Semester/IT 218: DSA with Java
Group'A'
Brief answer questions.[10*1=10]

1. What is theta notation?


2. What is a self-adjusting data structure?
3. What is priority queue?
4. What do you mean by tail recursion?
5. Define expression tree.
6. What do you mean by best-case complexity of an algorithm?
7. What is a linear probing?
8. What is topological sorting?
9. What are the elementary sorting algorithms?
10. What is Binary Tree?
Group 'B'

Sort Answer Questions: [5*4=20]

11. Write a function in Java to sort integers. (Use any algorithm)


12. Write a program in Java to create a linear linked list.
13. Write a program in Java to create stack (Push operation only).
14. Write a program in Java to store number in array using concept of hashing.
15. Create heap tree from given data: 20, 22, 33, 44, 12, 15, 18, 19, 20
Group 'C'

Comprehensive Answer Questions: [2*5=10]

16. Define graph. Write Dijkstra's algorithm to find shortest path in graph with example.
17. Explain B-tree of order 3 with example.

You might also like