Oral Question Bank

advertisement
Prelim Question Bank
 Chap 2:- Linked List
1.What is List ? Explain operations on list with example.
2.What is Linked List ? List types of Linked List.
3.What is Singly Linked List explain with it’s all operations.
4. What is Circular Linked List explain with it’s all operations.
5. What is Doubly Linked List explain with it’s all operations.
6.Write a algorithm for representation & adding two polynomials using Linked List.
OR
Write a algorithm for summing two polynomials using linked list.
7. Illustrate addition of two polynomials using linked list
1) 3x^4+ 4X^2 + 2X+5
and 2) 2x^3+3x+7
(5)
8. Explain the concept of free node & get node with respect to avail list.(5)
10. Write program on implementation of queue using linked list & define subroutine to enq,
deq,display.(10)
11. Write a program for Singly Linked List which performs following operations.
(10)
1) inert beginning
2)deletebeg
3)display
12.Write a program for Singly Linked List which performs following operations.
(10)
1) inert end
2)deletend
3)display
 Chap 4:- Non-Linear Data structures
 Trees
1. Define the following terms with an example.
a. Tree
b. Binary tree
c. Complete binary tree
d. Strictly binary tree
e. Almost complete binary tree
f. Binary search tree
g. Root
h. Leaf
i. Internal node
j. Ancestor
k. Descendent
l. Siblings
m. Level or depth of a node
n. Height of a tree
o. Degree of a node
p. Degree of a tree
q. Indegree
r. Outdegree
s. Heap
2. Explain what are the operation which can be performed on tree ? Explain in detail
searching operation with suitable example & algorithm.
3. Explain what are the operation which can be performed on binary tree ? Explain in detail
searching operation with suitable example & algorithm.
(10)
4. Explain two storage representations of a binary tree with an example.
5.What are the 3 traversal techniques of binary tree? Traverse the following trees in inorder,
preorder and postorder.
6. Explain what are the operation which can be performed on binary search tree ? Explain in
detail searching operation with suitable example & algorithm.
7. What is binary search tree ? Explain advantages of binary search tree over binary tree.
8. Explain conversion of General tree to binary tree with suitable example & diagram.
9. What are the 3 traversal techniques of binary search tree? Explain with example.
10. Write algorithm to insert new node in tree.
(5)
11.Assume the following information is read in a given order for tree.
10,20,15,14,30,40,7,9,35,50.If the tree is initially empty , how would a binary tree look like
after inserting the nodes in a given order. (5)
1. Write a note on applications of tree.
 Graphs
1.
Define the following terms with an example.
a. Graph
b. Directed graph
c. Undirected graph
d. Weighted graph
e. Connected graph
f. Strongly connected graph
g. Weakly connected graph
h. Complete graph
i. Simple graph
j. Path
k. Simple path
l. Closed path or Cycle
m. Cyclic graph
n. Acyclic graph
o. Degree of a node
p. Indgree of a node
q. Outdegree of a node
r. Degree of a node
2. Explain storage representations techniques of a graph with an example.
3. Explain an algorithm for BFS traversal technique with an example.
4. Explain an algorithm of DFS traversal technique with an example.
5. Differentiate BFS and DFS traversal techniques with an example?
6 Explain storage representations techniques of a graph & represent the following graph using
1)Adjacency Matrix Representation
A
A
B
2) Adjacency List representation.(10)
A
C
B
C
A
B
B
D
(A)
D
(B)
C
(C)
Chap6:-Sorting Techniques:
1. Why sorting is required explain with example? List different types of sorting techniques.
2. Explain Bubble Sort with following points.
i) Algorithm
ii) Solve example.
iii) Time complexity in all 3 cases (Best case ,Worst case, Average case.)
iv) Advantages & Disadvantages.
3. Explain bubble sort technique for sorting of ten integers. (5)
4. Explain Insertion Sort with following points.
i) Algorithm
ii) Solve example.
iii) Time complexity in all 3 cases(Best case ,Worst case, Average case.)
iv) Advantages & Disadvantages.
5. Explain Selection Sort with following points.
i) Algorithm
ii) Solve example.
iii) Time complexity in all 3 cases(Best case ,Worst case, Average case.)
iv) Advantages & Disadvantages.
6. Explain Merge Sort with following points.
i) Algorithm
ii) Solve example.
iii) Time complexity in all 3 cases(Best case ,Worst case, Average case.)
iv) Advantages & Disadvantages.
7. Explain Quick Sort with following points.
i) Algorithm
ii) Solve example.
iii) Time complexity in all 3 cases(Best case ,Worst case, Average case.)
iv) Advantages & Disadvantages.
8. Explain Radix Sort with following points.
i) Algorithm
ii) Solve example.
iii) Time complexity in all 3 cases(Best case ,Worst case, Average case.)
iv) Advantages & Disadvantages.
9. Sort the following numbers using Bubble Sort: 13, 33, 27, 77, 12, 43, 10, 432, 112, 90
10. Sort the following numbers using insertion sort: 7, 1, 3, 4, 10, 9, 8, 6, 5, 2
11. Sort the following numbers using selection sort: 25, 57, 48, 37,12,92,86,33
12. Write a c code for performing merging &sorting & Sort the following numbers using
merge sort: 10,1,9,11,46,20,15,0,72,2
13. Sort the following numbers using Quick sort:10,22,65,223,87,343,98,244,543,22,4
14. Sort the following numbers using Radix Sort. Show the status after each step:
12,92,20,16,62,22,58,34,55,36,40
(10)
15.What is the purpose of ‘O’ notation.
Download