Академический Документы
Профессиональный Документы
Культура Документы
com
UNIT I
PART A
1.
2.
Define ADT
3.
4.
5.
6.
7.
8.
9.
10.
PART B
1.
2.
3.
4.
www.Vidyarthiplus.com
www.Vidyarthiplus.com
printf(%d,s);
}
(b)
void print_sum(int a[][])
{
int i,j;
float s=0;
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
if(i==j)
s = s + a[i][j];
}
}
printf(%f,s); }
7. discuss about the concept of Balancing the Symbols and Evaluation of Postfix
Expression using stack.
8. explain about the conversion of Infix into Postfix Notation using Stack and the usage
of stack while compiling the functions in a program.
www.Vidyarthiplus.com
www.Vidyarthiplus.com
UNIT II
Part A
1.
2.
What is a Binary tree? What is the avg. depth of a binary search tree? Draw Worst-case binary
tree and specify its depth.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
Part B
1.
Write algorithms to implement the basic binary search tree operations-search, delete.
2.
Show the outcome of inserting 3,1,4,6,9,2,5,7 into an initially empty binary search tree. Show
the outcome of deleting the root.
3.
Show that the complexity of binary search algorithm for avg. and worst case is O(log2n).
4.
Explain the concepts for performing single and double rotations of AVL Trees?
5.
Show the outcome of inserting 2,1,4,5,9,3,6,7 into an initially empty AVL tree.
6.
Describe a data structure in which sequence of M operations takes total time of O(M log N).
7.
www.Vidyarthiplus.com
www.Vidyarthiplus.com
8.
Write algorithm to discuss various kinds tree traversals. discuss with example.
9.
Write the algorithm to insert an element from the binary heap tree. discuss with example.
10.
Write the algorithm to delete an element from the binary heap tree. discuss with example.
11.
Show the outcome of inserting 10,12,1,14,6,5,8,15,3,9,4,11,13,and 2, 1 at a time, into an initially
empty binary heap.
UNIT III
PART A
1.
2.
What is the running time of insertion sort in all elements are equal?
3.
Show the outcome on running Shell sort on the input 9,8,7,6,5,4,3,2,1 using the shell sizes 7,3,1.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
www.Vidyarthiplus.com
www.Vidyarthiplus.com
PART B
1.
Write algorithm to implement insertion sort and explain about the running time.
2.
102.
Show how heap sort processes the input 142, 543, 123, 65, 453, 879, 572, 434, 111, 242, 811,
3.
4.
5.
Write the routine to implement merge sort. Perform the merge sort for the subsequent list of
elements: 24,13,26,1,2,27,38,15.
6.
Write the routine to implement Quick Sort and discuss with an example.
7.
8.
9.
Write the algorithm to perform Heap Sort and discuss with example.
10.
Explain about Linear Probing and Quadratic probing techniques used in Hashing Techniques
11.
Explain about Linear Probing and Double Hashing techniques used in Hashing Techniques
UNIT IV
1.
2.
Define the following:path, simple path, cycle, connected graph, complete graph.
3.
4.
List the techniques used in reducing the running time of Dijkstras algorithm.
5.
6.
What is DAG?
7.
8.
9.
www.Vidyarthiplus.com
www.Vidyarthiplus.com
10.
a.
Class NP
b.
NP Complete issues
PART B
1.
2.
Describe the Prims algorithm for finding the minimum spanning tree in an undirected graph and
analyze its running time.
3.
Describe the Kruskals algorithm for finding the minimum spanning tree in an undirected graph
and analyze its running time.
4.
What is an Euler circuit? discuss the procedure to obtain an Euler circuit in an undirected graph
with an example.
5.
6.
7.
UNIT V
PART A
1.
2.
3.
4.
5.
PART B
www.Vidyarthiplus.com
www.Vidyarthiplus.com
1.
2.
3.
4.
5.
a.A file contains only colons, newlines, commas and digits in the subsequent frequency:
colon(100), space(605), new line(100), comma(705), 0(431), 1(242), 2(176), 3(59), 4(185), 5(250), 6(174),
7(199), 8(205), 9(217).Discuss a Greedy algorithm to compress the file.
6.
Describe in detail how greedy algorithms can be used in the Selection issue.
7.
8.
www.Vidyarthiplus.com